• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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="#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">
84  <code><a href="#insert">insert(fileId, body)</a></code></p>
85<p class="firstline">Adds a property to a file, or updates it if it already exists.</p>
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">
90  <code><a href="#patch">patch(fileId, propertyKey, body, visibility=None)</a></code></p>
91<p class="firstline">Updates a property.</p>
92<p class="toc_element">
93  <code><a href="#update">update(fileId, propertyKey, body, visibility=None)</a></code></p>
94<p class="firstline">Updates a property.</p>
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
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
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.
125    "kind": "drive#property", # This is always drive#property.
126    "value": "A String", # The value of this property.
127    "etag": "A String", # ETag of the property.
128    "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
129    "key": "A String", # The key of this property.
130    "selfLink": "A String", # The link back to this property.
131  }</pre>
132</div>
133
134<div class="method">
135    <code class="details" id="insert">insert(fileId, body)</code>
136  <pre>Adds a property to a file, or updates it if it already exists.
137
138Args:
139  fileId: string, The ID of the file. (required)
140  body: object, The request body. (required)
141    The object takes the form of:
142
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.
149  "kind": "drive#property", # This is always drive#property.
150  "value": "A String", # The value of this property.
151  "etag": "A String", # ETag of the property.
152  "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
153  "key": "A String", # The key of this property.
154  "selfLink": "A String", # The link back to this property.
155}
156
157
158Returns:
159  An object of the form:
160
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.
167    "kind": "drive#property", # This is always drive#property.
168    "value": "A String", # The value of this property.
169    "etag": "A String", # ETag of the property.
170    "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
171    "key": "A String", # The key of this property.
172    "selfLink": "A String", # The link back to this property.
173  }</pre>
174</div>
175
176<div class="method">
177    <code class="details" id="list">list(fileId)</code>
178  <pre>Lists a file's properties.
179
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.
187    "items": [ # The list of properties.
188      { # A key-value pair attached to a file that is either public or private to an application.
189          # The following limits apply to file properties:
190          # - Maximum of 100 properties total per file
191          # - Maximum of 30 private properties per app
192          # - Maximum of 30 public properties
193          # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
194        "kind": "drive#property", # This is always drive#property.
195        "value": "A String", # The value of this property.
196        "etag": "A String", # ETag of the property.
197        "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
198        "key": "A String", # The key of this property.
199        "selfLink": "A String", # The link back to this property.
200      },
201    ],
202    "kind": "drive#propertyList", # This is always drive#propertyList.
203    "etag": "A String", # The ETag of the list.
204    "selfLink": "A String", # The link back to this list.
205  }</pre>
206</div>
207
208<div class="method">
209    <code class="details" id="patch">patch(fileId, propertyKey, body, visibility=None)</code>
210  <pre>Updates a property.
211
212Args:
213  fileId: string, The ID of the file. (required)
214  propertyKey: string, The key of the property. (required)
215  body: object, The request body. (required)
216    The object takes the form of:
217
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.
224  "kind": "drive#property", # This is always drive#property.
225  "value": "A String", # The value of this property.
226  "etag": "A String", # ETag of the property.
227  "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
228  "key": "A String", # The key of this property.
229  "selfLink": "A String", # The link back to this property.
230}
231
232  visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
233
234Returns:
235  An object of the form:
236
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.
243    "kind": "drive#property", # This is always drive#property.
244    "value": "A String", # The value of this property.
245    "etag": "A String", # ETag of the property.
246    "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
247    "key": "A String", # The key of this property.
248    "selfLink": "A String", # The link back to this property.
249  }</pre>
250</div>
251
252<div class="method">
253    <code class="details" id="update">update(fileId, propertyKey, body, visibility=None)</code>
254  <pre>Updates a property.
255
256Args:
257  fileId: string, The ID of the file. (required)
258  propertyKey: string, The key of the property. (required)
259  body: object, The request body. (required)
260    The object takes the form of:
261
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.
268  "kind": "drive#property", # This is always drive#property.
269  "value": "A String", # The value of this property.
270  "etag": "A String", # ETag of the property.
271  "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
272  "key": "A String", # The key of this property.
273  "selfLink": "A String", # The link back to this property.
274}
275
276  visibility: string, The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
277
278Returns:
279  An object of the form:
280
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.
287    "kind": "drive#property", # This is always drive#property.
288    "value": "A String", # The value of this property.
289    "etag": "A String", # ETag of the property.
290    "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
291    "key": "A String", # The key of this property.
292    "selfLink": "A String", # The link back to this property.
293  }</pre>
294</div>
295
296</body></html>