blob: 09e2e46ed29708792dbc19ace8db5f00d53d58ef [file] [log] [blame]
Joe Gregorio075572b2012-07-09 16:53:09 -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.permissions.html">permissions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(fileId, permissionId)</a></code></p>
79<p class="firstline">Deletes a permission from a file.</p>
80<p class="toc_element">
81 <code><a href="#get">get(fileId, permissionId)</a></code></p>
82<p class="firstline">Gets a permission by ID.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(fileId, body, sendNotificationEmails=None)</a></code></p>
85<p class="firstline">Inserts a permission for a file.</p>
86<p class="toc_element">
87 <code><a href="#list">list(fileId)</a></code></p>
88<p class="firstline">Lists a file's permissions.</p>
89<p class="toc_element">
90 <code><a href="#patch">patch(fileId, permissionId, body)</a></code></p>
91<p class="firstline">Updates a permission. This method supports patch semantics.</p>
92<p class="toc_element">
93 <code><a href="#update">update(fileId, permissionId, body)</a></code></p>
94<p class="firstline">Updates a permission.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="delete">delete(fileId, permissionId)</code>
98 <pre>Deletes a permission from a file.
99
100Args:
101 fileId: string, The ID for the file. (required)
102 permissionId: string, The ID for the permission. (required)
103</pre>
104</div>
105
106<div class="method">
107 <code class="details" id="get">get(fileId, permissionId)</code>
108 <pre>Gets a permission by ID.
109
110Args:
111 fileId: string, The ID for the file. (required)
112 permissionId: string, The ID for the permission. (required)
113
114Returns:
115 An object of the form:
116
117 { # A single permission for a file.
118 "withLink": True or False, # Whether the link is required for this permission.
119 "kind": "drive#permission", # This is always drive#permission.
120 "name": "A String", # The name for this permission.
121 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
122 "id": "A String", # The ID of the permission.
123 "authKey": "A String", # The authkey parameter required for this permission.
124 "etag": "A String", # The ETag of the permission.
125 "role": "A String", # The primary role for this user. Allowed values are:
126 # - owner
127 # - reader
128 # - writer
129 "photoLink": "A String", # A link to the profile photo, if available.
130 "type": "A String", # The account type. Allowed values are:
131 # - user
132 # - group
133 # - domain
134 # - anyone
135 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
136 "A String",
137 ],
138 "selfLink": "A String", # A link back to this permission.
139 }</pre>
140</div>
141
142<div class="method">
143 <code class="details" id="insert">insert(fileId, body, sendNotificationEmails=None)</code>
144 <pre>Inserts a permission for a file.
145
146Args:
147 fileId: string, The ID for the file. (required)
148 body: object, The request body. (required)
149 The object takes the form of:
150
151{ # A single permission for a file.
152 "withLink": True or False, # Whether the link is required for this permission.
153 "kind": "drive#permission", # This is always drive#permission.
154 "name": "A String", # The name for this permission.
155 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
156 "id": "A String", # The ID of the permission.
157 "authKey": "A String", # The authkey parameter required for this permission.
158 "etag": "A String", # The ETag of the permission.
159 "role": "A String", # The primary role for this user. Allowed values are:
160 # - owner
161 # - reader
162 # - writer
163 "photoLink": "A String", # A link to the profile photo, if available.
164 "type": "A String", # The account type. Allowed values are:
165 # - user
166 # - group
167 # - domain
168 # - anyone
169 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
170 "A String",
171 ],
172 "selfLink": "A String", # A link back to this permission.
173}
174
175 sendNotificationEmails: boolean, Whether to send notification emails.
176
177Returns:
178 An object of the form:
179
180 { # A single permission for a file.
181 "withLink": True or False, # Whether the link is required for this permission.
182 "kind": "drive#permission", # This is always drive#permission.
183 "name": "A String", # The name for this permission.
184 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
185 "id": "A String", # The ID of the permission.
186 "authKey": "A String", # The authkey parameter required for this permission.
187 "etag": "A String", # The ETag of the permission.
188 "role": "A String", # The primary role for this user. Allowed values are:
189 # - owner
190 # - reader
191 # - writer
192 "photoLink": "A String", # A link to the profile photo, if available.
193 "type": "A String", # The account type. Allowed values are:
194 # - user
195 # - group
196 # - domain
197 # - anyone
198 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
199 "A String",
200 ],
201 "selfLink": "A String", # A link back to this permission.
202 }</pre>
203</div>
204
205<div class="method">
206 <code class="details" id="list">list(fileId)</code>
207 <pre>Lists a file's permissions.
208
209Args:
210 fileId: string, The ID for the file. (required)
211
212Returns:
213 An object of the form:
214
215 { # A list of permissions associated with a file.
216 "items": [ # The actual list of permissions.
217 { # A single permission for a file.
218 "withLink": True or False, # Whether the link is required for this permission.
219 "kind": "drive#permission", # This is always drive#permission.
220 "name": "A String", # The name for this permission.
221 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
222 "id": "A String", # The ID of the permission.
223 "authKey": "A String", # The authkey parameter required for this permission.
224 "etag": "A String", # The ETag of the permission.
225 "role": "A String", # The primary role for this user. Allowed values are:
226 # - owner
227 # - reader
228 # - writer
229 "photoLink": "A String", # A link to the profile photo, if available.
230 "type": "A String", # The account type. Allowed values are:
231 # - user
232 # - group
233 # - domain
234 # - anyone
235 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
236 "A String",
237 ],
238 "selfLink": "A String", # A link back to this permission.
239 },
240 ],
241 "kind": "drive#permissionList", # This is always drive#permissionList.
242 "etag": "A String", # The ETag of the list.
243 "selfLink": "A String", # A link back to this list.
244 }</pre>
245</div>
246
247<div class="method">
248 <code class="details" id="patch">patch(fileId, permissionId, body)</code>
249 <pre>Updates a permission. This method supports patch semantics.
250
251Args:
252 fileId: string, The ID for the file. (required)
253 permissionId: string, The ID for the permission. (required)
254 body: object, The request body. (required)
255 The object takes the form of:
256
257{ # A single permission for a file.
258 "withLink": True or False, # Whether the link is required for this permission.
259 "kind": "drive#permission", # This is always drive#permission.
260 "name": "A String", # The name for this permission.
261 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
262 "id": "A String", # The ID of the permission.
263 "authKey": "A String", # The authkey parameter required for this permission.
264 "etag": "A String", # The ETag of the permission.
265 "role": "A String", # The primary role for this user. Allowed values are:
266 # - owner
267 # - reader
268 # - writer
269 "photoLink": "A String", # A link to the profile photo, if available.
270 "type": "A String", # The account type. Allowed values are:
271 # - user
272 # - group
273 # - domain
274 # - anyone
275 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
276 "A String",
277 ],
278 "selfLink": "A String", # A link back to this permission.
279}
280
281
282Returns:
283 An object of the form:
284
285 { # A single permission for a file.
286 "withLink": True or False, # Whether the link is required for this permission.
287 "kind": "drive#permission", # This is always drive#permission.
288 "name": "A String", # The name for this permission.
289 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
290 "id": "A String", # The ID of the permission.
291 "authKey": "A String", # The authkey parameter required for this permission.
292 "etag": "A String", # The ETag of the permission.
293 "role": "A String", # The primary role for this user. Allowed values are:
294 # - owner
295 # - reader
296 # - writer
297 "photoLink": "A String", # A link to the profile photo, if available.
298 "type": "A String", # The account type. Allowed values are:
299 # - user
300 # - group
301 # - domain
302 # - anyone
303 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
304 "A String",
305 ],
306 "selfLink": "A String", # A link back to this permission.
307 }</pre>
308</div>
309
310<div class="method">
311 <code class="details" id="update">update(fileId, permissionId, body)</code>
312 <pre>Updates a permission.
313
314Args:
315 fileId: string, The ID for the file. (required)
316 permissionId: string, The ID for the permission. (required)
317 body: object, The request body. (required)
318 The object takes the form of:
319
320{ # A single permission for a file.
321 "withLink": True or False, # Whether the link is required for this permission.
322 "kind": "drive#permission", # This is always drive#permission.
323 "name": "A String", # The name for this permission.
324 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
325 "id": "A String", # The ID of the permission.
326 "authKey": "A String", # The authkey parameter required for this permission.
327 "etag": "A String", # The ETag of the permission.
328 "role": "A String", # The primary role for this user. Allowed values are:
329 # - owner
330 # - reader
331 # - writer
332 "photoLink": "A String", # A link to the profile photo, if available.
333 "type": "A String", # The account type. Allowed values are:
334 # - user
335 # - group
336 # - domain
337 # - anyone
338 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
339 "A String",
340 ],
341 "selfLink": "A String", # A link back to this permission.
342}
343
344
345Returns:
346 An object of the form:
347
348 { # A single permission for a file.
349 "withLink": True or False, # Whether the link is required for this permission.
350 "kind": "drive#permission", # This is always drive#permission.
351 "name": "A String", # The name for this permission.
352 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
353 "id": "A String", # The ID of the permission.
354 "authKey": "A String", # The authkey parameter required for this permission.
355 "etag": "A String", # The ETag of the permission.
356 "role": "A String", # The primary role for this user. Allowed values are:
357 # - owner
358 # - reader
359 # - writer
360 "photoLink": "A String", # A link to the profile photo, if available.
361 "type": "A String", # The account type. Allowed values are:
362 # - user
363 # - group
364 # - domain
365 # - anyone
366 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
367 "A String",
368 ],
369 "selfLink": "A String", # A link back to this permission.
370 }</pre>
371</div>
372
373</body></html>