John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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="drive_v2.html">Drive API</a> . <a href="drive_v2.properties.html">properties</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 81 | <code><a href="#delete">delete(fileId, propertyKey, visibility=None)</a></code></p> |
| 82 | <p class="firstline">Deletes a property.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(fileId, propertyKey, visibility=None)</a></code></p> |
| 85 | <p class="firstline">Gets a property by its key.</p> |
| 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#insert">insert(fileId, body=None)</a></code></p> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 88 | <p class="firstline">Adds a property to a file, or updates it if it already exists.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 89 | <p class="toc_element"> |
| 90 | <code><a href="#list">list(fileId)</a></code></p> |
| 91 | <p class="firstline">Lists a file's properties.</p> |
| 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#patch">patch(fileId, propertyKey, body=None, visibility=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Updates a property.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code><a href="#update">update(fileId, propertyKey, body=None, visibility=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Updates a property.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 100 | <code class="details" id="close">close()</code> |
| 101 | <pre>Close httplib2 connections.</pre> |
| 102 | </div> |
| 103 | |
| 104 | <div class="method"> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 105 | <code class="details" id="delete">delete(fileId, propertyKey, visibility=None)</code> |
| 106 | <pre>Deletes a property. |
| 107 | |
| 108 | Args: |
| 109 | fileId: string, The ID of the file. (required) |
| 110 | propertyKey: string, The key of the property. (required) |
| 111 | visibility: string, The visibility of the property. |
| 112 | </pre> |
| 113 | </div> |
| 114 | |
| 115 | <div class="method"> |
| 116 | <code class="details" id="get">get(fileId, propertyKey, visibility=None)</code> |
| 117 | <pre>Gets a property by its key. |
| 118 | |
| 119 | Args: |
| 120 | fileId: string, The ID of the file. (required) |
| 121 | propertyKey: string, The key of the property. (required) |
| 122 | visibility: string, The visibility of the property. |
| 123 | |
| 124 | Returns: |
| 125 | An object of the form: |
| 126 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 127 | { # A key-value pair attached to a file that is either public or private to an application. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 128 | # The following limits apply to file properties: |
| 129 | # - Maximum of 100 properties total per file |
| 130 | # - Maximum of 30 private properties per app |
| 131 | # - Maximum of 30 public properties |
| 132 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
| 133 | "etag": "A String", # ETag of the property. |
| 134 | "key": "A String", # The key of this property. |
| 135 | "kind": "drive#property", # This is always drive#property. |
| 136 | "selfLink": "A String", # The link back to this property. |
| 137 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 138 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 139 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 140 | </div> |
| 141 | |
| 142 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 143 | <code class="details" id="insert">insert(fileId, body=None)</code> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 144 | <pre>Adds a property to a file, or updates it if it already exists. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 145 | |
| 146 | Args: |
| 147 | fileId: string, The ID of the file. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 148 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 149 | The object takes the form of: |
| 150 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 151 | { # A key-value pair attached to a file that is either public or private to an application. |
| 152 | # The following limits apply to file properties: |
| 153 | # - Maximum of 100 properties total per file |
| 154 | # - Maximum of 30 private properties per app |
| 155 | # - Maximum of 30 public properties |
| 156 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 157 | "etag": "A String", # ETag of the property. |
| 158 | "key": "A String", # The key of this property. |
| 159 | "kind": "drive#property", # This is always drive#property. |
| 160 | "selfLink": "A String", # The link back to this property. |
| 161 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 162 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 163 | } |
| 164 | |
| 165 | |
| 166 | Returns: |
| 167 | An object of the form: |
| 168 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 169 | { # A key-value pair attached to a file that is either public or private to an application. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 170 | # The following limits apply to file properties: |
| 171 | # - Maximum of 100 properties total per file |
| 172 | # - Maximum of 30 private properties per app |
| 173 | # - Maximum of 30 public properties |
| 174 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
| 175 | "etag": "A String", # ETag of the property. |
| 176 | "key": "A String", # The key of this property. |
| 177 | "kind": "drive#property", # This is always drive#property. |
| 178 | "selfLink": "A String", # The link back to this property. |
| 179 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 180 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 181 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 182 | </div> |
| 183 | |
| 184 | <div class="method"> |
| 185 | <code class="details" id="list">list(fileId)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 186 | <pre>Lists a file's properties. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 187 | |
| 188 | Args: |
| 189 | fileId: string, The ID of the file. (required) |
| 190 | |
| 191 | Returns: |
| 192 | An object of the form: |
| 193 | |
| 194 | { # A collection of properties, key-value pairs that are either public or private to an application. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 195 | "etag": "A String", # The ETag of the list. |
| 196 | "items": [ # The list of properties. |
| 197 | { # A key-value pair attached to a file that is either public or private to an application. |
| 198 | # The following limits apply to file properties: |
| 199 | # - Maximum of 100 properties total per file |
| 200 | # - Maximum of 30 private properties per app |
| 201 | # - Maximum of 30 public properties |
| 202 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
| 203 | "etag": "A String", # ETag of the property. |
| 204 | "key": "A String", # The key of this property. |
| 205 | "kind": "drive#property", # This is always drive#property. |
| 206 | "selfLink": "A String", # The link back to this property. |
| 207 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 208 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 209 | }, |
| 210 | ], |
| 211 | "kind": "drive#propertyList", # This is always drive#propertyList. |
| 212 | "selfLink": "A String", # The link back to this list. |
| 213 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 214 | </div> |
| 215 | |
| 216 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 217 | <code class="details" id="patch">patch(fileId, propertyKey, body=None, visibility=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 218 | <pre>Updates a property. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 219 | |
| 220 | Args: |
| 221 | fileId: string, The ID of the file. (required) |
| 222 | propertyKey: string, The key of the property. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 223 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 224 | The object takes the form of: |
| 225 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 226 | { # A key-value pair attached to a file that is either public or private to an application. |
| 227 | # The following limits apply to file properties: |
| 228 | # - Maximum of 100 properties total per file |
| 229 | # - Maximum of 30 private properties per app |
| 230 | # - Maximum of 30 public properties |
| 231 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 232 | "etag": "A String", # ETag of the property. |
| 233 | "key": "A String", # The key of this property. |
| 234 | "kind": "drive#property", # This is always drive#property. |
| 235 | "selfLink": "A String", # The link back to this property. |
| 236 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 237 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 238 | } |
| 239 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 240 | visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 241 | |
| 242 | Returns: |
| 243 | An object of the form: |
| 244 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 245 | { # A key-value pair attached to a file that is either public or private to an application. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 246 | # The following limits apply to file properties: |
| 247 | # - Maximum of 100 properties total per file |
| 248 | # - Maximum of 30 private properties per app |
| 249 | # - Maximum of 30 public properties |
| 250 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
| 251 | "etag": "A String", # ETag of the property. |
| 252 | "key": "A String", # The key of this property. |
| 253 | "kind": "drive#property", # This is always drive#property. |
| 254 | "selfLink": "A String", # The link back to this property. |
| 255 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 256 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 257 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 258 | </div> |
| 259 | |
| 260 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 261 | <code class="details" id="update">update(fileId, propertyKey, body=None, visibility=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 262 | <pre>Updates a property. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 263 | |
| 264 | Args: |
| 265 | fileId: string, The ID of the file. (required) |
| 266 | propertyKey: string, The key of the property. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 267 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 268 | The object takes the form of: |
| 269 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 270 | { # A key-value pair attached to a file that is either public or private to an application. |
| 271 | # The following limits apply to file properties: |
| 272 | # - Maximum of 100 properties total per file |
| 273 | # - Maximum of 30 private properties per app |
| 274 | # - Maximum of 30 public properties |
| 275 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 276 | "etag": "A String", # ETag of the property. |
| 277 | "key": "A String", # The key of this property. |
| 278 | "kind": "drive#property", # This is always drive#property. |
| 279 | "selfLink": "A String", # The link back to this property. |
| 280 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 281 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 282 | } |
| 283 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 284 | visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 285 | |
| 286 | Returns: |
| 287 | An object of the form: |
| 288 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 289 | { # A key-value pair attached to a file that is either public or private to an application. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 290 | # The following limits apply to file properties: |
| 291 | # - Maximum of 100 properties total per file |
| 292 | # - Maximum of 30 private properties per app |
| 293 | # - Maximum of 30 public properties |
| 294 | # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. |
| 295 | "etag": "A String", # ETag of the property. |
| 296 | "key": "A String", # The key of this property. |
| 297 | "kind": "drive#property", # This is always drive#property. |
| 298 | "selfLink": "A String", # The link back to this property. |
| 299 | "value": "A String", # The value of this property. |
yoshi-code-bot | 6970659 | 2021-03-03 03:54:02 -0800 | [diff] [blame] | 300 | "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 301 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 302 | </div> |
| 303 | |
| 304 | </body></html> |