1<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.settings.html">settings</a> . <a href="gmail_v1.users.settings.filters.html">filters</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#create">create(userId, body=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Creates a filter. Note: you can only create a maximum of 1,000 filters.</p> 83<p class="toc_element"> 84 <code><a href="#delete">delete(userId, id, x__xgafv=None)</a></code></p> 85<p class="firstline">Deletes a filter.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(userId, id, x__xgafv=None)</a></code></p> 88<p class="firstline">Gets a filter.</p> 89<p class="toc_element"> 90 <code><a href="#list">list(userId, x__xgafv=None)</a></code></p> 91<p class="firstline">Lists the message filters of a Gmail user.</p> 92<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="close">close()</code> 95 <pre>Close httplib2 connections.</pre> 96</div> 97 98<div class="method"> 99 <code class="details" id="create">create(userId, body=None, x__xgafv=None)</code> 100 <pre>Creates a filter. Note: you can only create a maximum of 1,000 filters. 101 102Args: 103 userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) 104 body: object, The request body. 105 The object takes the form of: 106 107{ # Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread. 108 "action": { # A set of actions to perform on a message. # Action that the filter performs. 109 "addLabelIds": [ # List of labels to add to the message. 110 "A String", 111 ], 112 "forward": "A String", # Email address that the message should be forwarded to. 113 "removeLabelIds": [ # List of labels to remove from the message. 114 "A String", 115 ], 116 }, 117 "criteria": { # Message matching criteria. # Matching criteria for the filter. 118 "excludeChats": True or False, # Whether the response should exclude chats. 119 "from": "A String", # The sender's display name or email address. 120 "hasAttachment": True or False, # Whether the message has any attachment. 121 "negatedQuery": "A String", # Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 122 "query": "A String", # Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 123 "size": 42, # The size of the entire RFC822 message in bytes, including all headers and attachments. 124 "sizeComparison": "A String", # How the message size in bytes should be in relation to the size field. 125 "subject": "A String", # Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. 126 "to": "A String", # The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example@" both match "example@gmail.com". This field is case-insensitive. 127 }, 128 "id": "A String", # The server assigned ID of the filter. 129} 130 131 x__xgafv: string, V1 error format. 132 Allowed values 133 1 - v1 error format 134 2 - v2 error format 135 136Returns: 137 An object of the form: 138 139 { # Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread. 140 "action": { # A set of actions to perform on a message. # Action that the filter performs. 141 "addLabelIds": [ # List of labels to add to the message. 142 "A String", 143 ], 144 "forward": "A String", # Email address that the message should be forwarded to. 145 "removeLabelIds": [ # List of labels to remove from the message. 146 "A String", 147 ], 148 }, 149 "criteria": { # Message matching criteria. # Matching criteria for the filter. 150 "excludeChats": True or False, # Whether the response should exclude chats. 151 "from": "A String", # The sender's display name or email address. 152 "hasAttachment": True or False, # Whether the message has any attachment. 153 "negatedQuery": "A String", # Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 154 "query": "A String", # Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 155 "size": 42, # The size of the entire RFC822 message in bytes, including all headers and attachments. 156 "sizeComparison": "A String", # How the message size in bytes should be in relation to the size field. 157 "subject": "A String", # Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. 158 "to": "A String", # The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example@" both match "example@gmail.com". This field is case-insensitive. 159 }, 160 "id": "A String", # The server assigned ID of the filter. 161}</pre> 162</div> 163 164<div class="method"> 165 <code class="details" id="delete">delete(userId, id, x__xgafv=None)</code> 166 <pre>Deletes a filter. 167 168Args: 169 userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) 170 id: string, The ID of the filter to be deleted. (required) 171 x__xgafv: string, V1 error format. 172 Allowed values 173 1 - v1 error format 174 2 - v2 error format 175</pre> 176</div> 177 178<div class="method"> 179 <code class="details" id="get">get(userId, id, x__xgafv=None)</code> 180 <pre>Gets a filter. 181 182Args: 183 userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) 184 id: string, The ID of the filter to be fetched. (required) 185 x__xgafv: string, V1 error format. 186 Allowed values 187 1 - v1 error format 188 2 - v2 error format 189 190Returns: 191 An object of the form: 192 193 { # Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread. 194 "action": { # A set of actions to perform on a message. # Action that the filter performs. 195 "addLabelIds": [ # List of labels to add to the message. 196 "A String", 197 ], 198 "forward": "A String", # Email address that the message should be forwarded to. 199 "removeLabelIds": [ # List of labels to remove from the message. 200 "A String", 201 ], 202 }, 203 "criteria": { # Message matching criteria. # Matching criteria for the filter. 204 "excludeChats": True or False, # Whether the response should exclude chats. 205 "from": "A String", # The sender's display name or email address. 206 "hasAttachment": True or False, # Whether the message has any attachment. 207 "negatedQuery": "A String", # Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 208 "query": "A String", # Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 209 "size": 42, # The size of the entire RFC822 message in bytes, including all headers and attachments. 210 "sizeComparison": "A String", # How the message size in bytes should be in relation to the size field. 211 "subject": "A String", # Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. 212 "to": "A String", # The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example@" both match "example@gmail.com". This field is case-insensitive. 213 }, 214 "id": "A String", # The server assigned ID of the filter. 215}</pre> 216</div> 217 218<div class="method"> 219 <code class="details" id="list">list(userId, x__xgafv=None)</code> 220 <pre>Lists the message filters of a Gmail user. 221 222Args: 223 userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) 224 x__xgafv: string, V1 error format. 225 Allowed values 226 1 - v1 error format 227 2 - v2 error format 228 229Returns: 230 An object of the form: 231 232 { # Response for the ListFilters method. 233 "filter": [ # List of a user's filters. 234 { # Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread. 235 "action": { # A set of actions to perform on a message. # Action that the filter performs. 236 "addLabelIds": [ # List of labels to add to the message. 237 "A String", 238 ], 239 "forward": "A String", # Email address that the message should be forwarded to. 240 "removeLabelIds": [ # List of labels to remove from the message. 241 "A String", 242 ], 243 }, 244 "criteria": { # Message matching criteria. # Matching criteria for the filter. 245 "excludeChats": True or False, # Whether the response should exclude chats. 246 "from": "A String", # The sender's display name or email address. 247 "hasAttachment": True or False, # Whether the message has any attachment. 248 "negatedQuery": "A String", # Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 249 "query": "A String", # Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: is:unread"`. 250 "size": 42, # The size of the entire RFC822 message in bytes, including all headers and attachments. 251 "sizeComparison": "A String", # How the message size in bytes should be in relation to the size field. 252 "subject": "A String", # Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. 253 "to": "A String", # The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example@" both match "example@gmail.com". This field is case-insensitive. 254 }, 255 "id": "A String", # The server assigned ID of the filter. 256 }, 257 ], 258}</pre> 259</div> 260 261</body></html>