blob: 12ed0a9df263c601871bcd24d1eb48e649fe052f [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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="#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'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(fileId, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Adds a property to a file, or updates it if it already exists.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<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'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#patch">patch(fileId, propertyKey, body=None, visibility=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Updates a property.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#update">update(fileId, propertyKey, body=None, visibility=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Updates a property.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<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
100Args:
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
111Args:
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
116Returns:
117 An object of the form:
118
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000119 { # 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 Kim65020912020-05-20 12:08:20 -0700125 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
126 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
127 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
128 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
129 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
130 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400131 }</pre>
132</div>
133
134<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code class="details" id="insert">insert(fileId, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700136 <pre>Adds a property to a file, or updates it if it already exists.
John Asmuth614db982014-04-24 15:46:26 -0400137
138Args:
139 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700140 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400141 The object takes the form of:
142
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000143{ # 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 Kim65020912020-05-20 12:08:20 -0700149 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
150 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
151 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
152 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
153 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
154 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400155}
156
157
158Returns:
159 An object of the form:
160
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000161 { # 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 Kim65020912020-05-20 12:08:20 -0700167 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
168 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
169 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
170 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
171 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
172 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400173 }</pre>
174</div>
175
176<div class="method">
177 <code class="details" id="list">list(fileId)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 <pre>Lists a file&#x27;s properties.
John Asmuth614db982014-04-24 15:46:26 -0400179
180Args:
181 fileId: string, The ID of the file. (required)
182
183Returns:
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 Kim65020912020-05-20 12:08:20 -0700187 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the list.
188 &quot;items&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000189 { # 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 Kim65020912020-05-20 12:08:20 -0700195 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
196 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
197 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
198 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
199 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
200 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400201 },
202 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 &quot;kind&quot;: &quot;drive#propertyList&quot;, # This is always drive#propertyList.
204 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this list.
John Asmuth614db982014-04-24 15:46:26 -0400205 }</pre>
206</div>
207
208<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 <code class="details" id="patch">patch(fileId, propertyKey, body=None, visibility=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 <pre>Updates a property.
John Asmuth614db982014-04-24 15:46:26 -0400211
212Args:
213 fileId: string, The ID of the file. (required)
214 propertyKey: string, The key of the property. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700215 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400216 The object takes the form of:
217
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000218{ # 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 Kim65020912020-05-20 12:08:20 -0700224 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
225 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
226 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
227 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
228 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
229 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400230}
231
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400233
234Returns:
235 An object of the form:
236
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000237 { # 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 Kim65020912020-05-20 12:08:20 -0700243 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
244 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
245 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
246 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
247 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
248 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400249 }</pre>
250</div>
251
252<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 <code class="details" id="update">update(fileId, propertyKey, body=None, visibility=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 <pre>Updates a property.
John Asmuth614db982014-04-24 15:46:26 -0400255
256Args:
257 fileId: string, The ID of the file. (required)
258 propertyKey: string, The key of the property. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400260 The object takes the form of:
261
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000262{ # 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 Kim65020912020-05-20 12:08:20 -0700268 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
269 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
270 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
271 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
272 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
273 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400274}
275
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700276 visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400277
278Returns:
279 An object of the form:
280
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000281 { # 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 Kim65020912020-05-20 12:08:20 -0700287 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
288 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
289 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
290 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
291 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
292 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400293 }</pre>
294</div>
295
296</body></html>