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_v3.html">Drive API</a> . <a href="drive_v3.comments.html">comments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#create">create(fileId, body)</a></code></p>
79<p class="firstline">Creates a new comment on a file.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(fileId, commentId)</a></code></p>
82<p class="firstline">Deletes a comment.</p>
83<p class="toc_element">
84  <code><a href="#get">get(fileId, commentId, includeDeleted=None)</a></code></p>
85<p class="firstline">Gets a comment by ID.</p>
86<p class="toc_element">
87  <code><a href="#list">list(fileId, includeDeleted=None, pageToken=None, startModifiedTime=None, pageSize=None)</a></code></p>
88<p class="firstline">Lists a file's comments.</p>
89<p class="toc_element">
90  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93  <code><a href="#update">update(fileId, commentId, body)</a></code></p>
94<p class="firstline">Updates a comment with patch semantics.</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="create">create(fileId, body)</code>
98  <pre>Creates a new comment on a file.
99
100Args:
101  fileId: string, The ID of the file. (required)
102  body: object, The request body. (required)
103    The object takes the form of:
104
105{ # A comment on a file.
106    "resolved": True or False, # Whether the comment has been resolved by one of its replies.
107    "kind": "drive#comment", # Identifies what kind of resource this is. Value: the fixed string "drive#comment".
108    "modifiedTime": "A String", # The last time the comment or any of its replies was modified (RFC 3339 date-time).
109    "author": { # Information about a Drive user. # The user who created the comment.
110      "me": True or False, # Whether this user is the requesting user.
111      "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
112      "displayName": "A String", # A plain text displayable name for this user.
113      "permissionId": "A String", # The user's ID as visible in Permission resources.
114      "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
115      "photoLink": "A String", # A link to the user's profile photo, if available.
116    },
117    "deleted": True or False, # Whether the comment has been deleted. A deleted comment has no content.
118    "quotedFileContent": { # The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
119      "mimeType": "A String", # The MIME type of the quoted content.
120      "value": "A String", # The quoted content itself. This is interpreted as plain text if set through the API.
121    },
122    "htmlContent": "A String", # The content of the comment with HTML formatting.
123    "id": "A String", # The ID of the comment.
124    "content": "A String", # The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.
125    "replies": [ # The full list of replies to the comment in chronological order.
126      { # A reply to a comment on a file.
127        "kind": "drive#reply", # Identifies what kind of resource this is. Value: the fixed string "drive#reply".
128        "modifiedTime": "A String", # The last time the reply was modified (RFC 3339 date-time).
129        "author": { # Information about a Drive user. # The user who created the reply.
130          "me": True or False, # Whether this user is the requesting user.
131          "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
132          "displayName": "A String", # A plain text displayable name for this user.
133          "permissionId": "A String", # The user's ID as visible in Permission resources.
134          "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
135          "photoLink": "A String", # A link to the user's profile photo, if available.
136        },
137        "deleted": True or False, # Whether the reply has been deleted. A deleted reply has no content.
138        "htmlContent": "A String", # The content of the reply with HTML formatting.
139        "content": "A String", # The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
140        "createdTime": "A String", # The time at which the reply was created (RFC 3339 date-time).
141        "action": "A String", # The action the reply performed to the parent comment. Valid values are:
142            # - resolve
143            # - reopen
144        "id": "A String", # The ID of the reply.
145      },
146    ],
147    "createdTime": "A String", # The time at which the comment was created (RFC 3339 date-time).
148    "anchor": "A String", # A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.
149  }
150
151
152Returns:
153  An object of the form:
154
155    { # A comment on a file.
156      "resolved": True or False, # Whether the comment has been resolved by one of its replies.
157      "kind": "drive#comment", # Identifies what kind of resource this is. Value: the fixed string "drive#comment".
158      "modifiedTime": "A String", # The last time the comment or any of its replies was modified (RFC 3339 date-time).
159      "author": { # Information about a Drive user. # The user who created the comment.
160        "me": True or False, # Whether this user is the requesting user.
161        "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
162        "displayName": "A String", # A plain text displayable name for this user.
163        "permissionId": "A String", # The user's ID as visible in Permission resources.
164        "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
165        "photoLink": "A String", # A link to the user's profile photo, if available.
166      },
167      "deleted": True or False, # Whether the comment has been deleted. A deleted comment has no content.
168      "quotedFileContent": { # The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
169        "mimeType": "A String", # The MIME type of the quoted content.
170        "value": "A String", # The quoted content itself. This is interpreted as plain text if set through the API.
171      },
172      "htmlContent": "A String", # The content of the comment with HTML formatting.
173      "id": "A String", # The ID of the comment.
174      "content": "A String", # The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.
175      "replies": [ # The full list of replies to the comment in chronological order.
176        { # A reply to a comment on a file.
177          "kind": "drive#reply", # Identifies what kind of resource this is. Value: the fixed string "drive#reply".
178          "modifiedTime": "A String", # The last time the reply was modified (RFC 3339 date-time).
179          "author": { # Information about a Drive user. # The user who created the reply.
180            "me": True or False, # Whether this user is the requesting user.
181            "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
182            "displayName": "A String", # A plain text displayable name for this user.
183            "permissionId": "A String", # The user's ID as visible in Permission resources.
184            "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
185            "photoLink": "A String", # A link to the user's profile photo, if available.
186          },
187          "deleted": True or False, # Whether the reply has been deleted. A deleted reply has no content.
188          "htmlContent": "A String", # The content of the reply with HTML formatting.
189          "content": "A String", # The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
190          "createdTime": "A String", # The time at which the reply was created (RFC 3339 date-time).
191          "action": "A String", # The action the reply performed to the parent comment. Valid values are:
192              # - resolve
193              # - reopen
194          "id": "A String", # The ID of the reply.
195        },
196      ],
197      "createdTime": "A String", # The time at which the comment was created (RFC 3339 date-time).
198      "anchor": "A String", # A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.
199    }</pre>
200</div>
201
202<div class="method">
203    <code class="details" id="delete">delete(fileId, commentId)</code>
204  <pre>Deletes a comment.
205
206Args:
207  fileId: string, The ID of the file. (required)
208  commentId: string, The ID of the comment. (required)
209</pre>
210</div>
211
212<div class="method">
213    <code class="details" id="get">get(fileId, commentId, includeDeleted=None)</code>
214  <pre>Gets a comment by ID.
215
216Args:
217  fileId: string, The ID of the file. (required)
218  commentId: string, The ID of the comment. (required)
219  includeDeleted: boolean, Whether to return deleted comments. Deleted comments will not include their original content.
220
221Returns:
222  An object of the form:
223
224    { # A comment on a file.
225      "resolved": True or False, # Whether the comment has been resolved by one of its replies.
226      "kind": "drive#comment", # Identifies what kind of resource this is. Value: the fixed string "drive#comment".
227      "modifiedTime": "A String", # The last time the comment or any of its replies was modified (RFC 3339 date-time).
228      "author": { # Information about a Drive user. # The user who created the comment.
229        "me": True or False, # Whether this user is the requesting user.
230        "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
231        "displayName": "A String", # A plain text displayable name for this user.
232        "permissionId": "A String", # The user's ID as visible in Permission resources.
233        "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
234        "photoLink": "A String", # A link to the user's profile photo, if available.
235      },
236      "deleted": True or False, # Whether the comment has been deleted. A deleted comment has no content.
237      "quotedFileContent": { # The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
238        "mimeType": "A String", # The MIME type of the quoted content.
239        "value": "A String", # The quoted content itself. This is interpreted as plain text if set through the API.
240      },
241      "htmlContent": "A String", # The content of the comment with HTML formatting.
242      "id": "A String", # The ID of the comment.
243      "content": "A String", # The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.
244      "replies": [ # The full list of replies to the comment in chronological order.
245        { # A reply to a comment on a file.
246          "kind": "drive#reply", # Identifies what kind of resource this is. Value: the fixed string "drive#reply".
247          "modifiedTime": "A String", # The last time the reply was modified (RFC 3339 date-time).
248          "author": { # Information about a Drive user. # The user who created the reply.
249            "me": True or False, # Whether this user is the requesting user.
250            "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
251            "displayName": "A String", # A plain text displayable name for this user.
252            "permissionId": "A String", # The user's ID as visible in Permission resources.
253            "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
254            "photoLink": "A String", # A link to the user's profile photo, if available.
255          },
256          "deleted": True or False, # Whether the reply has been deleted. A deleted reply has no content.
257          "htmlContent": "A String", # The content of the reply with HTML formatting.
258          "content": "A String", # The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
259          "createdTime": "A String", # The time at which the reply was created (RFC 3339 date-time).
260          "action": "A String", # The action the reply performed to the parent comment. Valid values are:
261              # - resolve
262              # - reopen
263          "id": "A String", # The ID of the reply.
264        },
265      ],
266      "createdTime": "A String", # The time at which the comment was created (RFC 3339 date-time).
267      "anchor": "A String", # A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.
268    }</pre>
269</div>
270
271<div class="method">
272    <code class="details" id="list">list(fileId, includeDeleted=None, pageToken=None, startModifiedTime=None, pageSize=None)</code>
273  <pre>Lists a file's comments.
274
275Args:
276  fileId: string, The ID of the file. (required)
277  includeDeleted: boolean, Whether to include deleted comments. Deleted comments will not include their original content.
278  pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
279  startModifiedTime: string, The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).
280  pageSize: integer, The maximum number of comments to return per page.
281
282Returns:
283  An object of the form:
284
285    { # A list of comments on a file.
286    "nextPageToken": "A String", # The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
287    "kind": "drive#commentList", # Identifies what kind of resource this is. Value: the fixed string "drive#commentList".
288    "comments": [ # The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
289      { # A comment on a file.
290          "resolved": True or False, # Whether the comment has been resolved by one of its replies.
291          "kind": "drive#comment", # Identifies what kind of resource this is. Value: the fixed string "drive#comment".
292          "modifiedTime": "A String", # The last time the comment or any of its replies was modified (RFC 3339 date-time).
293          "author": { # Information about a Drive user. # The user who created the comment.
294            "me": True or False, # Whether this user is the requesting user.
295            "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
296            "displayName": "A String", # A plain text displayable name for this user.
297            "permissionId": "A String", # The user's ID as visible in Permission resources.
298            "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
299            "photoLink": "A String", # A link to the user's profile photo, if available.
300          },
301          "deleted": True or False, # Whether the comment has been deleted. A deleted comment has no content.
302          "quotedFileContent": { # The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
303            "mimeType": "A String", # The MIME type of the quoted content.
304            "value": "A String", # The quoted content itself. This is interpreted as plain text if set through the API.
305          },
306          "htmlContent": "A String", # The content of the comment with HTML formatting.
307          "id": "A String", # The ID of the comment.
308          "content": "A String", # The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.
309          "replies": [ # The full list of replies to the comment in chronological order.
310            { # A reply to a comment on a file.
311              "kind": "drive#reply", # Identifies what kind of resource this is. Value: the fixed string "drive#reply".
312              "modifiedTime": "A String", # The last time the reply was modified (RFC 3339 date-time).
313              "author": { # Information about a Drive user. # The user who created the reply.
314                "me": True or False, # Whether this user is the requesting user.
315                "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
316                "displayName": "A String", # A plain text displayable name for this user.
317                "permissionId": "A String", # The user's ID as visible in Permission resources.
318                "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
319                "photoLink": "A String", # A link to the user's profile photo, if available.
320              },
321              "deleted": True or False, # Whether the reply has been deleted. A deleted reply has no content.
322              "htmlContent": "A String", # The content of the reply with HTML formatting.
323              "content": "A String", # The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
324              "createdTime": "A String", # The time at which the reply was created (RFC 3339 date-time).
325              "action": "A String", # The action the reply performed to the parent comment. Valid values are:
326                  # - resolve
327                  # - reopen
328              "id": "A String", # The ID of the reply.
329            },
330          ],
331          "createdTime": "A String", # The time at which the comment was created (RFC 3339 date-time).
332          "anchor": "A String", # A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.
333        },
334    ],
335  }</pre>
336</div>
337
338<div class="method">
339    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
340  <pre>Retrieves the next page of results.
341
342Args:
343  previous_request: The request for the previous page. (required)
344  previous_response: The response from the request for the previous page. (required)
345
346Returns:
347  A request object that you can call 'execute()' on to request the next
348  page. Returns None if there are no more items in the collection.
349    </pre>
350</div>
351
352<div class="method">
353    <code class="details" id="update">update(fileId, commentId, body)</code>
354  <pre>Updates a comment with patch semantics.
355
356Args:
357  fileId: string, The ID of the file. (required)
358  commentId: string, The ID of the comment. (required)
359  body: object, The request body. (required)
360    The object takes the form of:
361
362{ # A comment on a file.
363    "resolved": True or False, # Whether the comment has been resolved by one of its replies.
364    "kind": "drive#comment", # Identifies what kind of resource this is. Value: the fixed string "drive#comment".
365    "modifiedTime": "A String", # The last time the comment or any of its replies was modified (RFC 3339 date-time).
366    "author": { # Information about a Drive user. # The user who created the comment.
367      "me": True or False, # Whether this user is the requesting user.
368      "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
369      "displayName": "A String", # A plain text displayable name for this user.
370      "permissionId": "A String", # The user's ID as visible in Permission resources.
371      "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
372      "photoLink": "A String", # A link to the user's profile photo, if available.
373    },
374    "deleted": True or False, # Whether the comment has been deleted. A deleted comment has no content.
375    "quotedFileContent": { # The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
376      "mimeType": "A String", # The MIME type of the quoted content.
377      "value": "A String", # The quoted content itself. This is interpreted as plain text if set through the API.
378    },
379    "htmlContent": "A String", # The content of the comment with HTML formatting.
380    "id": "A String", # The ID of the comment.
381    "content": "A String", # The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.
382    "replies": [ # The full list of replies to the comment in chronological order.
383      { # A reply to a comment on a file.
384        "kind": "drive#reply", # Identifies what kind of resource this is. Value: the fixed string "drive#reply".
385        "modifiedTime": "A String", # The last time the reply was modified (RFC 3339 date-time).
386        "author": { # Information about a Drive user. # The user who created the reply.
387          "me": True or False, # Whether this user is the requesting user.
388          "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
389          "displayName": "A String", # A plain text displayable name for this user.
390          "permissionId": "A String", # The user's ID as visible in Permission resources.
391          "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
392          "photoLink": "A String", # A link to the user's profile photo, if available.
393        },
394        "deleted": True or False, # Whether the reply has been deleted. A deleted reply has no content.
395        "htmlContent": "A String", # The content of the reply with HTML formatting.
396        "content": "A String", # The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
397        "createdTime": "A String", # The time at which the reply was created (RFC 3339 date-time).
398        "action": "A String", # The action the reply performed to the parent comment. Valid values are:
399            # - resolve
400            # - reopen
401        "id": "A String", # The ID of the reply.
402      },
403    ],
404    "createdTime": "A String", # The time at which the comment was created (RFC 3339 date-time).
405    "anchor": "A String", # A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.
406  }
407
408
409Returns:
410  An object of the form:
411
412    { # A comment on a file.
413      "resolved": True or False, # Whether the comment has been resolved by one of its replies.
414      "kind": "drive#comment", # Identifies what kind of resource this is. Value: the fixed string "drive#comment".
415      "modifiedTime": "A String", # The last time the comment or any of its replies was modified (RFC 3339 date-time).
416      "author": { # Information about a Drive user. # The user who created the comment.
417        "me": True or False, # Whether this user is the requesting user.
418        "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
419        "displayName": "A String", # A plain text displayable name for this user.
420        "permissionId": "A String", # The user's ID as visible in Permission resources.
421        "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
422        "photoLink": "A String", # A link to the user's profile photo, if available.
423      },
424      "deleted": True or False, # Whether the comment has been deleted. A deleted comment has no content.
425      "quotedFileContent": { # The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
426        "mimeType": "A String", # The MIME type of the quoted content.
427        "value": "A String", # The quoted content itself. This is interpreted as plain text if set through the API.
428      },
429      "htmlContent": "A String", # The content of the comment with HTML formatting.
430      "id": "A String", # The ID of the comment.
431      "content": "A String", # The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.
432      "replies": [ # The full list of replies to the comment in chronological order.
433        { # A reply to a comment on a file.
434          "kind": "drive#reply", # Identifies what kind of resource this is. Value: the fixed string "drive#reply".
435          "modifiedTime": "A String", # The last time the reply was modified (RFC 3339 date-time).
436          "author": { # Information about a Drive user. # The user who created the reply.
437            "me": True or False, # Whether this user is the requesting user.
438            "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
439            "displayName": "A String", # A plain text displayable name for this user.
440            "permissionId": "A String", # The user's ID as visible in Permission resources.
441            "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
442            "photoLink": "A String", # A link to the user's profile photo, if available.
443          },
444          "deleted": True or False, # Whether the reply has been deleted. A deleted reply has no content.
445          "htmlContent": "A String", # The content of the reply with HTML formatting.
446          "content": "A String", # The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.
447          "createdTime": "A String", # The time at which the reply was created (RFC 3339 date-time).
448          "action": "A String", # The action the reply performed to the parent comment. Valid values are:
449              # - resolve
450              # - reopen
451          "id": "A String", # The ID of the reply.
452        },
453      ],
454      "createdTime": "A String", # The time at which the comment was created (RFC 3339 date-time).
455      "anchor": "A String", # A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.
456    }</pre>
457</div>
458
459</body></html>