blob: 5d170c89d140e82c7bc238e11bd1f9bf61915c63 [file] [log] [blame]
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001<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="youtube_v3.html">YouTube Data API</a> . <a href="youtube_v3.comments.html">comments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(id)</a></code></p>
79<p class="firstline">Deletes a comment.</p>
80<p class="toc_element">
81 <code><a href="#insert">insert(part=None, body)</a></code></p>
82<p class="firstline">Creates a new comment.</p>
83<p class="toc_element">
84 <code><a href="#list">list(part, pageToken=None, maxResults=None, id=None, parentId=None, textFormat=None)</a></code></p>
85<p class="firstline">Returns a list of comments that match the API request parameters.</p>
86<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
90 <code><a href="#markAsSpam">markAsSpam(id)</a></code></p>
91<p class="firstline">Expresses the caller's opinion that a comment is spam.</p>
92<p class="toc_element">
93 <code><a href="#setModerationStatus">setModerationStatus(id, moderationStatus, banAuthor=None)</a></code></p>
94<p class="firstline">Sets the moderation status of one or more comments.</p>
95<p class="toc_element">
96 <code><a href="#update">update(part=None, body)</a></code></p>
97<p class="firstline">Modifies an existing comment.</p>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="delete">delete(id)</code>
101 <pre>Deletes a comment.
102
103Args:
104 id: string, The id parameter specifies the comment ID for the resource that should be deleted. (required)
105</pre>
106</div>
107
108<div class="method">
109 <code class="details" id="insert">insert(part=None, body)</code>
110 <pre>Creates a new comment.
111
112Note: to create a top level comment it is also necessary to create a comment thread. Both are accomplished through the commentThreads resource.
113
114Args:
115 part: string, The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.
116
117The part names that you can include in the parameter value are id and snippet. However only snippet contains properties that can be set. (required)
118 body: object, The request body. (required)
119 The object takes the form of:
120
121{ # A comment represents a single YouTube comment.
122 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
123 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
124 "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
125 "authorDisplayName": "A String", # The name of the user who posted the comment.
126 "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
127 "videoId": "A String", # The ID of the video the comment refers to, if any.
128 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
129 "likeCount": 42, # The total number of likes this comment has received.
130 "authorChannelId": { # The id of the author's YouTube channel, if any.
131 "value": "A String",
132 },
133 "parentId": "A String", # The unique id of the parent comment, only set for replies.
134 "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
135 "canRate": True or False, # Whether the current viewer can rate this comment.
136 "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
137 "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
138 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
139 "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
140 "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
141 },
142 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
143 "etag": "A String", # Etag of this resource.
144 "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
145}
146
147
148Returns:
149 An object of the form:
150
151 { # A comment represents a single YouTube comment.
152 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
153 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
154 "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
155 "authorDisplayName": "A String", # The name of the user who posted the comment.
156 "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
157 "videoId": "A String", # The ID of the video the comment refers to, if any.
158 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
159 "likeCount": 42, # The total number of likes this comment has received.
160 "authorChannelId": { # The id of the author's YouTube channel, if any.
161 "value": "A String",
162 },
163 "parentId": "A String", # The unique id of the parent comment, only set for replies.
164 "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
165 "canRate": True or False, # Whether the current viewer can rate this comment.
166 "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
167 "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
168 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
169 "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
170 "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
171 },
172 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
173 "etag": "A String", # Etag of this resource.
174 "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
175 }</pre>
176</div>
177
178<div class="method">
179 <code class="details" id="list">list(part, pageToken=None, maxResults=None, id=None, parentId=None, textFormat=None)</code>
180 <pre>Returns a list of comments that match the API request parameters.
181
182Args:
183 part: string, The part parameter specifies the comment resource parts that the API response will include. Supported values are id and snippet. (required)
184 pageToken: string, The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identifies the next page of the result that can be retrieved.
185
186Note: This parameter is not supported for use in conjunction with the id parameter.
187 maxResults: integer, The maxResults parameter specifies the maximum number of items that should be returned in the result set.
188
189Note: This parameter is not supported for use in conjunction with the id parameter.
190 id: string, The id parameter specifies a comma-separated list of comment IDs for the resources that should be retrieved.
191 parentId: string, The parentId parameter specifies the ID of the comment for which replies should be retrieved.
192
193Note: Currently YouTube features only one level of replies (ie replies to top level comments). However replies to replies may be supported in the future.
194 textFormat: string, Set this parameter's value to html or plainText to instruct the API to return the comments left by users formatted as HTML or as plain text.
195 Allowed values
196 html - Returns the comments in HTML format.
197 plainText - Returns the comments in plain text format.
198
199Returns:
200 An object of the form:
201
202 {
203 "eventId": "A String", # Serialized EventId of the request which produced this response.
204 "nextPageToken": "A String", # The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.
205 "kind": "youtube#commentListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse".
206 "visitorId": "A String", # The visitorId identifies the visitor.
207 "items": [ # A list of comments that match the request criteria.
208 { # A comment represents a single YouTube comment.
209 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
210 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
211 "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
212 "authorDisplayName": "A String", # The name of the user who posted the comment.
213 "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
214 "videoId": "A String", # The ID of the video the comment refers to, if any.
215 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
216 "likeCount": 42, # The total number of likes this comment has received.
217 "authorChannelId": { # The id of the author's YouTube channel, if any.
218 "value": "A String",
219 },
220 "parentId": "A String", # The unique id of the parent comment, only set for replies.
221 "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
222 "canRate": True or False, # Whether the current viewer can rate this comment.
223 "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
224 "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
225 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
226 "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
227 "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
228 },
229 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
230 "etag": "A String", # Etag of this resource.
231 "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
232 },
233 ],
234 "tokenPagination": { # Stub token pagination template to suppress results.
235 },
236 "etag": "A String", # Etag of this resource.
237 "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page.
238 "totalResults": 42, # The total number of results in the result set.
239 "resultsPerPage": 42, # The number of results included in the API response.
240 },
241 }</pre>
242</div>
243
244<div class="method">
245 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
246 <pre>Retrieves the next page of results.
247
248Args:
249 previous_request: The request for the previous page. (required)
250 previous_response: The response from the request for the previous page. (required)
251
252Returns:
253 A request object that you can call 'execute()' on to request the next
254 page. Returns None if there are no more items in the collection.
255 </pre>
256</div>
257
258<div class="method">
259 <code class="details" id="markAsSpam">markAsSpam(id)</code>
260 <pre>Expresses the caller's opinion that a comment is spam.
261
262Args:
263 id: string, The id parameter specifies a comma-separated list of IDs of comments which should get flagged as spam. (required)
264</pre>
265</div>
266
267<div class="method">
268 <code class="details" id="setModerationStatus">setModerationStatus(id, moderationStatus, banAuthor=None)</code>
269 <pre>Sets the moderation status of one or more comments.
270
271Args:
272 id: string, The id parameter specifies a comma-separated list of IDs of comments whose moderation status should be updated. (required)
273 moderationStatus: string, Determines the new moderation status of the specified comments. (required)
274 Allowed values
275 heldForReview - Marks a comment as awaiting review by a moderator.
276 published - Clears a comment for public display.
277 rejected - Rejects a comment as not fit for display.
278
279Note: currently there is no way to list or otherwise discover a rejected comment. However it is possible to change its moderation status as long as its ID is still known.
280
281Note: Currently, if you reject a comment you effectively also hide all its replies as there is no longer any way to discover them. This may change in the future.
282 banAuthor: boolean, The banAuthor paramter, if set to true, adds the author of the comment to the ban list. This means all future comments of the author will autmomatically be rejected.
283
284Note: This parameter is only valid in combination with moderationStatus 'rejected'.
285</pre>
286</div>
287
288<div class="method">
289 <code class="details" id="update">update(part=None, body)</code>
290 <pre>Modifies an existing comment.
291
292Args:
293 part: string, The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.
294
295The part names that you can include in the parameter value are id and snippet. However only snippet contains properties that can be updated. (required)
296 body: object, The request body. (required)
297 The object takes the form of:
298
299{ # A comment represents a single YouTube comment.
300 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
301 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
302 "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
303 "authorDisplayName": "A String", # The name of the user who posted the comment.
304 "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
305 "videoId": "A String", # The ID of the video the comment refers to, if any.
306 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
307 "likeCount": 42, # The total number of likes this comment has received.
308 "authorChannelId": { # The id of the author's YouTube channel, if any.
309 "value": "A String",
310 },
311 "parentId": "A String", # The unique id of the parent comment, only set for replies.
312 "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
313 "canRate": True or False, # Whether the current viewer can rate this comment.
314 "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
315 "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
316 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
317 "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
318 "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
319 },
320 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
321 "etag": "A String", # Etag of this resource.
322 "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
323}
324
325
326Returns:
327 An object of the form:
328
329 { # A comment represents a single YouTube comment.
330 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
331 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
332 "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
333 "authorDisplayName": "A String", # The name of the user who posted the comment.
334 "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
335 "videoId": "A String", # The ID of the video the comment refers to, if any.
336 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
337 "likeCount": 42, # The total number of likes this comment has received.
338 "authorChannelId": { # The id of the author's YouTube channel, if any.
339 "value": "A String",
340 },
341 "parentId": "A String", # The unique id of the parent comment, only set for replies.
342 "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
343 "canRate": True or False, # Whether the current viewer can rate this comment.
344 "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
345 "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
346 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
347 "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
348 "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
349 },
350 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
351 "etag": "A String", # Etag of this resource.
352 "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
353 }</pre>
354</div>
355
356</body></html>