blob: d1501ec742ba60655d9a598192f77b61629ff295 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="gmail_v1.html">Gmail API</a> . <a href="gmail_v1.users.html">users</a> . <a href="gmail_v1.users.labels.html">labels</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(userId, body)</a></code></p>
79<p class="firstline">Creates a new label.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(userId, id)</a></code></p>
82<p class="firstline">Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.</p>
83<p class="toc_element">
84 <code><a href="#get">get(userId, id)</a></code></p>
85<p class="firstline">Gets the specified label.</p>
86<p class="toc_element">
87 <code><a href="#list">list(userId)</a></code></p>
88<p class="firstline">Lists all labels in the user's mailbox.</p>
89<p class="toc_element">
90 <code><a href="#patch">patch(userId, id, body)</a></code></p>
91<p class="firstline">Updates the specified label. This method supports patch semantics.</p>
92<p class="toc_element">
93 <code><a href="#update">update(userId, id, body)</a></code></p>
94<p class="firstline">Updates the specified label.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(userId, body)</code>
98 <pre>Creates a new label.
99
100Args:
101 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
102 body: object, The request body. (required)
103 The object takes the form of:
104
105{ # Labels are used to categorize messages and threads within the user's mailbox.
106 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
107 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
108 "id": "A String", # The immutable ID of the label.
109 "name": "A String", # The display name of the label.
110 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
111}
112
113
114Returns:
115 An object of the form:
116
117 { # Labels are used to categorize messages and threads within the user's mailbox.
118 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
119 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
120 "id": "A String", # The immutable ID of the label.
121 "name": "A String", # The display name of the label.
122 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
123 }</pre>
124</div>
125
126<div class="method">
127 <code class="details" id="delete">delete(userId, id)</code>
128 <pre>Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
129
130Args:
131 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
132 id: string, The ID of the label to delete. (required)
133</pre>
134</div>
135
136<div class="method">
137 <code class="details" id="get">get(userId, id)</code>
138 <pre>Gets the specified label.
139
140Args:
141 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
142 id: string, The ID of the label to retrieve. (required)
143
144Returns:
145 An object of the form:
146
147 { # Labels are used to categorize messages and threads within the user's mailbox.
148 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
149 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
150 "id": "A String", # The immutable ID of the label.
151 "name": "A String", # The display name of the label.
152 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
153 }</pre>
154</div>
155
156<div class="method">
157 <code class="details" id="list">list(userId)</code>
158 <pre>Lists all labels in the user's mailbox.
159
160Args:
161 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
162
163Returns:
164 An object of the form:
165
166 {
167 "labels": [ # List of labels.
168 { # Labels are used to categorize messages and threads within the user's mailbox.
169 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
170 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
171 "id": "A String", # The immutable ID of the label.
172 "name": "A String", # The display name of the label.
173 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
174 },
175 ],
176 }</pre>
177</div>
178
179<div class="method">
180 <code class="details" id="patch">patch(userId, id, body)</code>
181 <pre>Updates the specified label. This method supports patch semantics.
182
183Args:
184 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
185 id: string, The ID of the label to update. (required)
186 body: object, The request body. (required)
187 The object takes the form of:
188
189{ # Labels are used to categorize messages and threads within the user's mailbox.
190 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
191 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
192 "id": "A String", # The immutable ID of the label.
193 "name": "A String", # The display name of the label.
194 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
195}
196
197
198Returns:
199 An object of the form:
200
201 { # Labels are used to categorize messages and threads within the user's mailbox.
202 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
203 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
204 "id": "A String", # The immutable ID of the label.
205 "name": "A String", # The display name of the label.
206 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
207 }</pre>
208</div>
209
210<div class="method">
211 <code class="details" id="update">update(userId, id, body)</code>
212 <pre>Updates the specified label.
213
214Args:
215 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
216 id: string, The ID of the label to update. (required)
217 body: object, The request body. (required)
218 The object takes the form of:
219
220{ # Labels are used to categorize messages and threads within the user's mailbox.
221 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
222 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
223 "id": "A String", # The immutable ID of the label.
224 "name": "A String", # The display name of the label.
225 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
226}
227
228
229Returns:
230 An object of the form:
231
232 { # Labels are used to categorize messages and threads within the user's mailbox.
233 "type": "A String", # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
234 "messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
235 "id": "A String", # The immutable ID of the label.
236 "name": "A String", # The display name of the label.
237 "labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
238 }</pre>
239</div>
240
241</body></html>