| 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"> | 
 | 78 |   <code><a href="#delete">delete(fileId, propertyKey, visibility=None)</a></code></p> | 
 | 79 | <p class="firstline">Deletes a property.</p> | 
 | 80 | <p class="toc_element"> | 
 | 81 |   <code><a href="#get">get(fileId, propertyKey, visibility=None)</a></code></p> | 
 | 82 | <p class="firstline">Gets a property by its key.</p> | 
 | 83 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 |   <code><a href="#insert">insert(fileId, body=None)</a></code></p> | 
| Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 85 | <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] | 86 | <p class="toc_element"> | 
 | 87 |   <code><a href="#list">list(fileId)</a></code></p> | 
 | 88 | <p class="firstline">Lists a file's properties.</p> | 
 | 89 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 |   <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] | 91 | <p class="firstline">Updates a property.</p> | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 92 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 |   <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] | 94 | <p class="firstline">Updates a property.</p> | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 95 | <h3>Method Details</h3> | 
 | 96 | <div class="method"> | 
 | 97 |     <code class="details" id="delete">delete(fileId, propertyKey, visibility=None)</code> | 
 | 98 |   <pre>Deletes a property. | 
 | 99 |  | 
 | 100 | Args: | 
 | 101 |   fileId: string, The ID of the file. (required) | 
 | 102 |   propertyKey: string, The key of the property. (required) | 
 | 103 |   visibility: string, The visibility of the property. | 
 | 104 | </pre> | 
 | 105 | </div> | 
 | 106 |  | 
 | 107 | <div class="method"> | 
 | 108 |     <code class="details" id="get">get(fileId, propertyKey, visibility=None)</code> | 
 | 109 |   <pre>Gets a property by its key. | 
 | 110 |  | 
 | 111 | Args: | 
 | 112 |   fileId: string, The ID of the file. (required) | 
 | 113 |   propertyKey: string, The key of the property. (required) | 
 | 114 |   visibility: string, The visibility of the property. | 
 | 115 |  | 
 | 116 | Returns: | 
 | 117 |   An object of the form: | 
 | 118 |  | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 119 |     { # A key-value pair attached to a file that is either public or private to an application. | 
 | 120 |       # The following limits apply to file properties: | 
 | 121 |       # - Maximum of 100 properties total per file | 
 | 122 |       # - Maximum of 30 private properties per app | 
 | 123 |       # - Maximum of 30 public properties | 
 | 124 |       # - 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] | 125 |     "etag": "A String", # ETag of the property. | 
 | 126 |     "key": "A String", # The key of this property. | 
 | 127 |     "kind": "drive#property", # This is always drive#property. | 
 | 128 |     "selfLink": "A String", # The link back to this property. | 
 | 129 |     "value": "A String", # The value of this property. | 
 | 130 |     "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 131 |   }</pre> | 
 | 132 | </div> | 
 | 133 |  | 
 | 134 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 135 |     <code class="details" id="insert">insert(fileId, body=None)</code> | 
| Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 136 |   <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] | 137 |  | 
 | 138 | Args: | 
 | 139 |   fileId: string, The ID of the file. (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 140 |   body: object, The request body. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 141 |     The object takes the form of: | 
 | 142 |  | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 143 | { # A key-value pair attached to a file that is either public or private to an application. | 
 | 144 |     # The following limits apply to file properties: | 
 | 145 |     # - Maximum of 100 properties total per file | 
 | 146 |     # - Maximum of 30 private properties per app | 
 | 147 |     # - Maximum of 30 public properties | 
 | 148 |     # - 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] | 149 |   "etag": "A String", # ETag of the property. | 
 | 150 |   "key": "A String", # The key of this property. | 
 | 151 |   "kind": "drive#property", # This is always drive#property. | 
 | 152 |   "selfLink": "A String", # The link back to this property. | 
 | 153 |   "value": "A String", # The value of this property. | 
 | 154 |   "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 155 | } | 
 | 156 |  | 
 | 157 |  | 
 | 158 | Returns: | 
 | 159 |   An object of the form: | 
 | 160 |  | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 161 |     { # A key-value pair attached to a file that is either public or private to an application. | 
 | 162 |       # The following limits apply to file properties: | 
 | 163 |       # - Maximum of 100 properties total per file | 
 | 164 |       # - Maximum of 30 private properties per app | 
 | 165 |       # - Maximum of 30 public properties | 
 | 166 |       # - 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] | 167 |     "etag": "A String", # ETag of the property. | 
 | 168 |     "key": "A String", # The key of this property. | 
 | 169 |     "kind": "drive#property", # This is always drive#property. | 
 | 170 |     "selfLink": "A String", # The link back to this property. | 
 | 171 |     "value": "A String", # The value of this property. | 
 | 172 |     "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 173 |   }</pre> | 
 | 174 | </div> | 
 | 175 |  | 
 | 176 | <div class="method"> | 
 | 177 |     <code class="details" id="list">list(fileId)</code> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 178 |   <pre>Lists a file's properties. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 179 |  | 
 | 180 | Args: | 
 | 181 |   fileId: string, The ID of the file. (required) | 
 | 182 |  | 
 | 183 | Returns: | 
 | 184 |   An object of the form: | 
 | 185 |  | 
 | 186 |     { # A collection of properties, key-value pairs that are either public or private to an application. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 187 |     "etag": "A String", # The ETag of the list. | 
 | 188 |     "items": [ # The list of properties. | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 189 |       { # A key-value pair attached to a file that is either public or private to an application. | 
 | 190 |           # The following limits apply to file properties: | 
 | 191 |           # - Maximum of 100 properties total per file | 
 | 192 |           # - Maximum of 30 private properties per app | 
 | 193 |           # - Maximum of 30 public properties | 
 | 194 |           # - 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] | 195 |         "etag": "A String", # ETag of the property. | 
 | 196 |         "key": "A String", # The key of this property. | 
 | 197 |         "kind": "drive#property", # This is always drive#property. | 
 | 198 |         "selfLink": "A String", # The link back to this property. | 
 | 199 |         "value": "A String", # The value of this property. | 
 | 200 |         "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 201 |       }, | 
 | 202 |     ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 203 |     "kind": "drive#propertyList", # This is always drive#propertyList. | 
 | 204 |     "selfLink": "A String", # The link back to this list. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 205 |   }</pre> | 
 | 206 | </div> | 
 | 207 |  | 
 | 208 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 209 |     <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] | 210 |   <pre>Updates a property. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 211 |  | 
 | 212 | Args: | 
 | 213 |   fileId: string, The ID of the file. (required) | 
 | 214 |   propertyKey: string, The key of the property. (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 215 |   body: object, The request body. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 216 |     The object takes the form of: | 
 | 217 |  | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 218 | { # A key-value pair attached to a file that is either public or private to an application. | 
 | 219 |     # The following limits apply to file properties: | 
 | 220 |     # - Maximum of 100 properties total per file | 
 | 221 |     # - Maximum of 30 private properties per app | 
 | 222 |     # - Maximum of 30 public properties | 
 | 223 |     # - 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] | 224 |   "etag": "A String", # ETag of the property. | 
 | 225 |   "key": "A String", # The key of this property. | 
 | 226 |   "kind": "drive#property", # This is always drive#property. | 
 | 227 |   "selfLink": "A String", # The link back to this property. | 
 | 228 |   "value": "A String", # The value of this property. | 
 | 229 |   "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 230 | } | 
 | 231 |  | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 232 |   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] | 233 |  | 
 | 234 | Returns: | 
 | 235 |   An object of the form: | 
 | 236 |  | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 237 |     { # A key-value pair attached to a file that is either public or private to an application. | 
 | 238 |       # The following limits apply to file properties: | 
 | 239 |       # - Maximum of 100 properties total per file | 
 | 240 |       # - Maximum of 30 private properties per app | 
 | 241 |       # - Maximum of 30 public properties | 
 | 242 |       # - 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] | 243 |     "etag": "A String", # ETag of the property. | 
 | 244 |     "key": "A String", # The key of this property. | 
 | 245 |     "kind": "drive#property", # This is always drive#property. | 
 | 246 |     "selfLink": "A String", # The link back to this property. | 
 | 247 |     "value": "A String", # The value of this property. | 
 | 248 |     "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 249 |   }</pre> | 
 | 250 | </div> | 
 | 251 |  | 
 | 252 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 253 |     <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] | 254 |   <pre>Updates a property. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 255 |  | 
 | 256 | Args: | 
 | 257 |   fileId: string, The ID of the file. (required) | 
 | 258 |   propertyKey: string, The key of the property. (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 259 |   body: object, The request body. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 260 |     The object takes the form of: | 
 | 261 |  | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 262 | { # A key-value pair attached to a file that is either public or private to an application. | 
 | 263 |     # The following limits apply to file properties: | 
 | 264 |     # - Maximum of 100 properties total per file | 
 | 265 |     # - Maximum of 30 private properties per app | 
 | 266 |     # - Maximum of 30 public properties | 
 | 267 |     # - 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] | 268 |   "etag": "A String", # ETag of the property. | 
 | 269 |   "key": "A String", # The key of this property. | 
 | 270 |   "kind": "drive#property", # This is always drive#property. | 
 | 271 |   "selfLink": "A String", # The link back to this property. | 
 | 272 |   "value": "A String", # The value of this property. | 
 | 273 |   "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 274 | } | 
 | 275 |  | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 276 |   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] | 277 |  | 
 | 278 | Returns: | 
 | 279 |   An object of the form: | 
 | 280 |  | 
| Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 281 |     { # A key-value pair attached to a file that is either public or private to an application. | 
 | 282 |       # The following limits apply to file properties: | 
 | 283 |       # - Maximum of 100 properties total per file | 
 | 284 |       # - Maximum of 30 private properties per app | 
 | 285 |       # - Maximum of 30 public properties | 
 | 286 |       # - 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] | 287 |     "etag": "A String", # ETag of the property. | 
 | 288 |     "key": "A String", # The key of this property. | 
 | 289 |     "kind": "drive#property", # This is always drive#property. | 
 | 290 |     "selfLink": "A String", # The link back to this property. | 
 | 291 |     "value": "A String", # The value of this property. | 
 | 292 |     "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 293 |   }</pre> | 
 | 294 | </div> | 
 | 295 |  | 
 | 296 | </body></html> |