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="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="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 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"> 87 <code><a href="#insert">insert(fileId, body=None)</a></code></p> 88<p class="firstline">Adds a property to a file, or updates it if it already exists.</p> 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"> 93 <code><a href="#patch">patch(fileId, propertyKey, body=None, visibility=None)</a></code></p> 94<p class="firstline">Updates a property.</p> 95<p class="toc_element"> 96 <code><a href="#update">update(fileId, propertyKey, body=None, visibility=None)</a></code></p> 97<p class="firstline">Updates a property.</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="close">close()</code> 101 <pre>Close httplib2 connections.</pre> 102</div> 103 104<div class="method"> 105 <code class="details" id="delete">delete(fileId, propertyKey, visibility=None)</code> 106 <pre>Deletes a property. 107 108Args: 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 119Args: 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 124Returns: 125 An object of the form: 126 127 { # A key-value pair attached to a file that is either public or private to an application. 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. 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. 139}</pre> 140</div> 141 142<div class="method"> 143 <code class="details" id="insert">insert(fileId, body=None)</code> 144 <pre>Adds a property to a file, or updates it if it already exists. 145 146Args: 147 fileId: string, The ID of the file. (required) 148 body: object, The request body. 149 The object takes the form of: 150 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. 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. 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. 163} 164 165 166Returns: 167 An object of the form: 168 169 { # A key-value pair attached to a file that is either public or private to an application. 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. 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. 181}</pre> 182</div> 183 184<div class="method"> 185 <code class="details" id="list">list(fileId)</code> 186 <pre>Lists a file's properties. 187 188Args: 189 fileId: string, The ID of the file. (required) 190 191Returns: 192 An object of the form: 193 194 { # A collection of properties, key-value pairs that are either public or private to an application. 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. 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. 209 }, 210 ], 211 "kind": "drive#propertyList", # This is always drive#propertyList. 212 "selfLink": "A String", # The link back to this list. 213}</pre> 214</div> 215 216<div class="method"> 217 <code class="details" id="patch">patch(fileId, propertyKey, body=None, visibility=None)</code> 218 <pre>Updates a property. 219 220Args: 221 fileId: string, The ID of the file. (required) 222 propertyKey: string, The key of the property. (required) 223 body: object, The request body. 224 The object takes the form of: 225 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. 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. 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. 238} 239 240 visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) 241 242Returns: 243 An object of the form: 244 245 { # A key-value pair attached to a file that is either public or private to an application. 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. 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. 257}</pre> 258</div> 259 260<div class="method"> 261 <code class="details" id="update">update(fileId, propertyKey, body=None, visibility=None)</code> 262 <pre>Updates a property. 263 264Args: 265 fileId: string, The ID of the file. (required) 266 propertyKey: string, The key of the property. (required) 267 body: object, The request body. 268 The object takes the form of: 269 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. 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. 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. 282} 283 284 visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) 285 286Returns: 287 An object of the form: 288 289 { # A key-value pair attached to a file that is either public or private to an application. 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. 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. 301}</pre> 302</div> 303 304</body></html>