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="youtube_v3.html">YouTube Data API v3</a> . <a href="youtube_v3.comments.html">comments</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(id, x__xgafv=None)</a></code></p> 82<p class="firstline">Deletes a resource.</p> 83<p class="toc_element"> 84 <code><a href="#insert">insert(part, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Inserts a new resource into this collection.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(part, id=None, maxResults=None, pageToken=None, parentId=None, textFormat=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Retrieves a list of resources, possibly filtered.</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="#markAsSpam">markAsSpam(id, x__xgafv=None)</a></code></p> 94<p class="firstline">Expresses the caller's opinion that one or more comments should be flagged as spam.</p> 95<p class="toc_element"> 96 <code><a href="#setModerationStatus">setModerationStatus(id, moderationStatus, banAuthor=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Sets the moderation status of one or more comments.</p> 98<p class="toc_element"> 99 <code><a href="#update">update(part, body=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Updates an existing resource.</p> 101<h3>Method Details</h3> 102<div class="method"> 103 <code class="details" id="close">close()</code> 104 <pre>Close httplib2 connections.</pre> 105</div> 106 107<div class="method"> 108 <code class="details" id="delete">delete(id, x__xgafv=None)</code> 109 <pre>Deletes a resource. 110 111Args: 112 id: string, A parameter (required) 113 x__xgafv: string, V1 error format. 114 Allowed values 115 1 - v1 error format 116 2 - v2 error format 117</pre> 118</div> 119 120<div class="method"> 121 <code class="details" id="insert">insert(part, body=None, x__xgafv=None)</code> 122 <pre>Inserts a new resource into this collection. 123 124Args: 125 part: string, The *part* parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units. (required) (repeated) 126 body: object, The request body. 127 The object takes the form of: 128 129{ # A *comment* represents a single YouTube comment. 130 "etag": "A String", # Etag of this resource. 131 "id": "A String", # The ID that YouTube uses to uniquely identify the comment. 132 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment". 133 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment. 134 "authorChannelId": { # The id of the author's YouTube channel, if any. 135 "value": "A String", 136 }, 137 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any. 138 "authorDisplayName": "A String", # The name of the user who posted the comment. 139 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment. 140 "canRate": True or False, # Whether the current viewer can rate this comment. 141 "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. 142 "likeCount": 42, # The total number of likes this comment has received. 143 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter. 144 "parentId": "A String", # The unique id of the parent comment, only set for replies. 145 "publishedAt": "A String", # The date and time when the comment was originally published. 146 "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. 147 "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. 148 "updatedAt": "A String", # The date and time when the comment was last updated. 149 "videoId": "A String", # The ID of the video the comment refers to, if any. 150 "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. 151 }, 152} 153 154 x__xgafv: string, V1 error format. 155 Allowed values 156 1 - v1 error format 157 2 - v2 error format 158 159Returns: 160 An object of the form: 161 162 { # A *comment* represents a single YouTube comment. 163 "etag": "A String", # Etag of this resource. 164 "id": "A String", # The ID that YouTube uses to uniquely identify the comment. 165 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment". 166 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment. 167 "authorChannelId": { # The id of the author's YouTube channel, if any. 168 "value": "A String", 169 }, 170 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any. 171 "authorDisplayName": "A String", # The name of the user who posted the comment. 172 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment. 173 "canRate": True or False, # Whether the current viewer can rate this comment. 174 "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. 175 "likeCount": 42, # The total number of likes this comment has received. 176 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter. 177 "parentId": "A String", # The unique id of the parent comment, only set for replies. 178 "publishedAt": "A String", # The date and time when the comment was originally published. 179 "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. 180 "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. 181 "updatedAt": "A String", # The date and time when the comment was last updated. 182 "videoId": "A String", # The ID of the video the comment refers to, if any. 183 "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. 184 }, 185}</pre> 186</div> 187 188<div class="method"> 189 <code class="details" id="list">list(part, id=None, maxResults=None, pageToken=None, parentId=None, textFormat=None, x__xgafv=None)</code> 190 <pre>Retrieves a list of resources, possibly filtered. 191 192Args: 193 part: string, The *part* parameter specifies a comma-separated list of one or more comment resource properties that the API response will include. (required) (repeated) 194 id: string, Returns the comments with the given IDs for One Platform. (repeated) 195 maxResults: integer, The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. 196 pageToken: string, The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. 197 parentId: string, Returns replies to the specified comment. Note, currently YouTube features only one level of replies (ie replies to top level comments). However replies to replies may be supported in the future. 198 textFormat: string, The requested text format for the returned comments. 199 Allowed values 200 textFormatUnspecified - 201 html - Returns the comments in HTML format. This is the default value. 202 plainText - Returns the comments in plain text format. 203 x__xgafv: string, V1 error format. 204 Allowed values 205 1 - v1 error format 206 2 - v2 error format 207 208Returns: 209 An object of the form: 210 211 { 212 "etag": "A String", # Etag of this resource. 213 "eventId": "A String", # Serialized EventId of the request which produced this response. 214 "items": [ # A list of comments that match the request criteria. 215 { # A *comment* represents a single YouTube comment. 216 "etag": "A String", # Etag of this resource. 217 "id": "A String", # The ID that YouTube uses to uniquely identify the comment. 218 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment". 219 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment. 220 "authorChannelId": { # The id of the author's YouTube channel, if any. 221 "value": "A String", 222 }, 223 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any. 224 "authorDisplayName": "A String", # The name of the user who posted the comment. 225 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment. 226 "canRate": True or False, # Whether the current viewer can rate this comment. 227 "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. 228 "likeCount": 42, # The total number of likes this comment has received. 229 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter. 230 "parentId": "A String", # The unique id of the parent comment, only set for replies. 231 "publishedAt": "A String", # The date and time when the comment was originally published. 232 "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. 233 "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. 234 "updatedAt": "A String", # The date and time when the comment was last updated. 235 "videoId": "A String", # The ID of the video the comment refers to, if any. 236 "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. 237 }, 238 }, 239 ], 240 "kind": "youtube#commentListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse". 241 "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. 242 "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. # General pagination information. 243 "resultsPerPage": 42, # The number of results included in the API response. 244 "totalResults": 42, # The total number of results in the result set. 245 }, 246 "tokenPagination": { # Stub token pagination template to suppress results. 247 }, 248 "visitorId": "A String", # The visitorId identifies the visitor. 249}</pre> 250</div> 251 252<div class="method"> 253 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 254 <pre>Retrieves the next page of results. 255 256Args: 257 previous_request: The request for the previous page. (required) 258 previous_response: The response from the request for the previous page. (required) 259 260Returns: 261 A request object that you can call 'execute()' on to request the next 262 page. Returns None if there are no more items in the collection. 263 </pre> 264</div> 265 266<div class="method"> 267 <code class="details" id="markAsSpam">markAsSpam(id, x__xgafv=None)</code> 268 <pre>Expresses the caller's opinion that one or more comments should be flagged as spam. 269 270Args: 271 id: string, Flags the comments with the given IDs as spam in the caller's opinion. (required) (repeated) 272 x__xgafv: string, V1 error format. 273 Allowed values 274 1 - v1 error format 275 2 - v2 error format 276</pre> 277</div> 278 279<div class="method"> 280 <code class="details" id="setModerationStatus">setModerationStatus(id, moderationStatus, banAuthor=None, x__xgafv=None)</code> 281 <pre>Sets the moderation status of one or more comments. 282 283Args: 284 id: string, Modifies the moderation status of the comments with the given IDs (required) (repeated) 285 moderationStatus: string, Specifies the requested moderation status. Note, comments can be in statuses, which are not available through this call. For example, this call does not allow to mark a comment as 'likely spam'. Valid values: MODERATION_STATUS_PUBLISHED, MODERATION_STATUS_HELD_FOR_REVIEW, MODERATION_STATUS_REJECTED. (required) 286 Allowed values 287 published - The comment is available for public display. 288 heldForReview - The comment is awaiting review by a moderator. 289 likelySpam - 290 rejected - The comment is unfit for display. 291 banAuthor: boolean, If set to true the author of the comment gets added to the ban list. This means all future comments of the author will autmomatically be rejected. Only valid in combination with STATUS_REJECTED. 292 x__xgafv: string, V1 error format. 293 Allowed values 294 1 - v1 error format 295 2 - v2 error format 296</pre> 297</div> 298 299<div class="method"> 300 <code class="details" id="update">update(part, body=None, x__xgafv=None)</code> 301 <pre>Updates an existing resource. 302 303Args: 304 part: string, The *part* parameter identifies the properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update. (required) (repeated) 305 body: object, The request body. 306 The object takes the form of: 307 308{ # A *comment* represents a single YouTube comment. 309 "etag": "A String", # Etag of this resource. 310 "id": "A String", # The ID that YouTube uses to uniquely identify the comment. 311 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment". 312 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment. 313 "authorChannelId": { # The id of the author's YouTube channel, if any. 314 "value": "A String", 315 }, 316 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any. 317 "authorDisplayName": "A String", # The name of the user who posted the comment. 318 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment. 319 "canRate": True or False, # Whether the current viewer can rate this comment. 320 "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. 321 "likeCount": 42, # The total number of likes this comment has received. 322 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter. 323 "parentId": "A String", # The unique id of the parent comment, only set for replies. 324 "publishedAt": "A String", # The date and time when the comment was originally published. 325 "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. 326 "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. 327 "updatedAt": "A String", # The date and time when the comment was last updated. 328 "videoId": "A String", # The ID of the video the comment refers to, if any. 329 "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. 330 }, 331} 332 333 x__xgafv: string, V1 error format. 334 Allowed values 335 1 - v1 error format 336 2 - v2 error format 337 338Returns: 339 An object of the form: 340 341 { # A *comment* represents a single YouTube comment. 342 "etag": "A String", # Etag of this resource. 343 "id": "A String", # The ID that YouTube uses to uniquely identify the comment. 344 "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment". 345 "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment. 346 "authorChannelId": { # The id of the author's YouTube channel, if any. 347 "value": "A String", 348 }, 349 "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any. 350 "authorDisplayName": "A String", # The name of the user who posted the comment. 351 "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment. 352 "canRate": True or False, # Whether the current viewer can rate this comment. 353 "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. 354 "likeCount": 42, # The total number of likes this comment has received. 355 "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter. 356 "parentId": "A String", # The unique id of the parent comment, only set for replies. 357 "publishedAt": "A String", # The date and time when the comment was originally published. 358 "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. 359 "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. 360 "updatedAt": "A String", # The date and time when the comment was last updated. 361 "videoId": "A String", # The ID of the video the comment refers to, if any. 362 "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. 363 }, 364}</pre> 365</div> 366 367</body></html>