blob: bbc757b39be27cd7e4f02d1a61308775278a72a3 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<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>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#create">create(userId, body)</a></code></p>
<p class="firstline">Creates a new label.</p>
<p class="toc_element">
<code><a href="#delete">delete(userId, id)</a></code></p>
<p class="firstline">Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.</p>
<p class="toc_element">
<code><a href="#get">get(userId, id)</a></code></p>
<p class="firstline">Gets the specified label.</p>
<p class="toc_element">
<code><a href="#list">list(userId)</a></code></p>
<p class="firstline">Lists all labels in the user's mailbox.</p>
<p class="toc_element">
<code><a href="#patch">patch(userId, id, body)</a></code></p>
<p class="firstline">Updates the specified label. This method supports patch semantics.</p>
<p class="toc_element">
<code><a href="#update">update(userId, id, body)</a></code></p>
<p class="firstline">Updates the specified label.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="create">create(userId, body)</code>
<pre>Creates a new label.
Args:
userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
body: object, The request body. (required)
The object takes the form of:
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
}
Returns:
An object of the form:
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
}</pre>
</div>
<div class="method">
<code class="details" id="delete">delete(userId, id)</code>
<pre>Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
Args:
userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
id: string, The ID of the label to delete. (required)
</pre>
</div>
<div class="method">
<code class="details" id="get">get(userId, id)</code>
<pre>Gets the specified label.
Args:
userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
id: string, The ID of the label to retrieve. (required)
Returns:
An object of the form:
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(userId)</code>
<pre>Lists all labels in the user's mailbox.
Args:
userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
Returns:
An object of the form:
{
"labels": [ # List of labels.
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="patch">patch(userId, id, body)</code>
<pre>Updates the specified label. This method supports patch semantics.
Args:
userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
id: string, The ID of the label to update. (required)
body: object, The request body. (required)
The object takes the form of:
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
}
Returns:
An object of the form:
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
}</pre>
</div>
<div class="method">
<code class="details" id="update">update(userId, id, body)</code>
<pre>Updates the specified label.
Args:
userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
id: string, The ID of the label to update. (required)
body: object, The request body. (required)
The object takes the form of:
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
}
Returns:
An object of the form:
{ # Labels are used to categorize messages and threads within the user's mailbox.
"name": "A String", # The display name of the label.
"messagesTotal": 42, # The total number of messages with the label.
"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.
"threadsUnread": 42, # The number of unread threads with the label.
"messagesUnread": 42, # The number of unread messages with the label.
"labelListVisibility": "A String", # The visibility of the label in the label list in the Gmail web interface.
"threadsTotal": 42, # The total number of threads with the label.
"messageListVisibility": "A String", # The visibility of the label in the message list in the Gmail web interface.
"id": "A String", # The immutable ID of the label.
}</pre>
</div>
</body></html>