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</a> . <a href="youtube_v3.liveChatMessages.html">liveChatMessages</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 chat message.</p> 80<p class="toc_element"> 81 <code><a href="#insert">insert(part, body)</a></code></p> 82<p class="firstline">Adds a message to a live chat.</p> 83<p class="toc_element"> 84 <code><a href="#list">list(liveChatId, part, profileImageSize=None, hl=None, maxResults=None, pageToken=None)</a></code></p> 85<p class="firstline">Lists live chat messages for a specific chat.</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<h3>Method Details</h3> 90<div class="method"> 91 <code class="details" id="delete">delete(id)</code> 92 <pre>Deletes a chat message. 93 94Args: 95 id: string, The id parameter specifies the YouTube chat message ID of the resource that is being deleted. (required) 96</pre> 97</div> 98 99<div class="method"> 100 <code class="details" id="insert">insert(part, body)</code> 101 <pre>Adds a message to a live chat. 102 103Args: 104 part: string, The part parameter serves two purposes. It identifies the properties that the write operation will set as well as the properties that the API response will include. Set the parameter value to snippet. (required) 105 body: object, The request body. (required) 106 The object takes the form of: 107 108{ # A liveChatMessage resource represents a chat message in a YouTube Live Chat. 109 "snippet": { # The snippet object contains basic details about the message. 110 "displayMessage": "A String", # Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent. 111 "messageRetractedDetails": { 112 "retractedMessageId": "A String", 113 }, 114 "superChatDetails": { # Details about the Super Chat event, this is only set if the type is 'superChatEvent'. 115 "tier": 42, # The tier in which the amount belongs to. Lower amounts belong to lower tiers. Starts at 1. 116 "currency": "A String", # The currency in which the purchase was made. 117 "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user. 118 "userComment": "A String", # The comment added by the user to this Super Chat event. 119 "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75). 120 }, 121 "fanFundingEventDetails": { # Details about the funding event, this is only set if the type is 'fanFundingEvent'. 122 "currency": "A String", # The currency in which the fund was made. 123 "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user. 124 "userComment": "A String", # The comment added by the user to this fan funding event. 125 "amountMicros": "A String", # The amount of the fund. 126 }, 127 "hasDisplayContent": True or False, # Whether the message has display content that should be displayed to users. 128 "publishedAt": "A String", # The date and time when the message was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. 129 "userBannedDetails": { 130 "banDurationSeconds": "A String", # The duration of the ban. This property is only present if the banType is temporary. 131 "bannedUserDetails": { # The details of the user that was banned. 132 "channelId": "A String", # The YouTube channel ID. 133 "displayName": "A String", # The channel's display name. 134 "profileImageUrl": "A String", # The channels's avatar URL. 135 "channelUrl": "A String", # The channel's URL. 136 }, 137 "banType": "A String", # The type of ban. 138 }, 139 "liveChatId": "A String", 140 "authorChannelId": "A String", # The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase 141 "pollEditedDetails": { 142 "items": [ 143 { 144 "itemId": "A String", 145 "description": "A String", # Plain text description of the item. 146 }, 147 ], 148 "prompt": "A String", 149 "id": "A String", 150 }, 151 "textMessageDetails": { # Details about the text message, this is only set if the type is 'textMessageEvent'. 152 "messageText": "A String", # The user's message. 153 }, 154 "messageDeletedDetails": { 155 "deletedMessageId": "A String", 156 }, 157 "pollVotedDetails": { 158 "itemId": "A String", # The poll item the user chose. 159 "pollId": "A String", # The poll the user voted on. 160 }, 161 "pollOpenedDetails": { 162 "items": [ 163 { 164 "itemId": "A String", 165 "description": "A String", # Plain text description of the item. 166 }, 167 ], 168 "prompt": "A String", 169 "id": "A String", 170 }, 171 "type": "A String", # The type of message, this will always be present, it determines the contents of the message as well as which fields will be present. 172 "pollClosedDetails": { 173 "pollId": "A String", # The id of the poll that was closed. 174 }, 175 }, 176 "kind": "youtube#liveChatMessage", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage". 177 "etag": "A String", # Etag of this resource. 178 "authorDetails": { # The authorDetails object contains basic details about the user that posted this message. 179 "displayName": "A String", # The channel's display name. 180 "isChatModerator": True or False, # Whether the author is a moderator of the live chat. 181 "channelId": "A String", # The YouTube channel ID. 182 "isChatSponsor": True or False, # Whether the author is a sponsor of the live chat. 183 "profileImageUrl": "A String", # The channels's avatar URL. 184 "isChatOwner": True or False, # Whether the author is the owner of the live chat. 185 "isVerified": True or False, # Whether the author's identity has been verified by YouTube. 186 "channelUrl": "A String", # The channel's URL. 187 }, 188 "id": "A String", # The ID that YouTube assigns to uniquely identify the message. 189 } 190 191 192Returns: 193 An object of the form: 194 195 { # A liveChatMessage resource represents a chat message in a YouTube Live Chat. 196 "snippet": { # The snippet object contains basic details about the message. 197 "displayMessage": "A String", # Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent. 198 "messageRetractedDetails": { 199 "retractedMessageId": "A String", 200 }, 201 "superChatDetails": { # Details about the Super Chat event, this is only set if the type is 'superChatEvent'. 202 "tier": 42, # The tier in which the amount belongs to. Lower amounts belong to lower tiers. Starts at 1. 203 "currency": "A String", # The currency in which the purchase was made. 204 "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user. 205 "userComment": "A String", # The comment added by the user to this Super Chat event. 206 "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75). 207 }, 208 "fanFundingEventDetails": { # Details about the funding event, this is only set if the type is 'fanFundingEvent'. 209 "currency": "A String", # The currency in which the fund was made. 210 "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user. 211 "userComment": "A String", # The comment added by the user to this fan funding event. 212 "amountMicros": "A String", # The amount of the fund. 213 }, 214 "hasDisplayContent": True or False, # Whether the message has display content that should be displayed to users. 215 "publishedAt": "A String", # The date and time when the message was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. 216 "userBannedDetails": { 217 "banDurationSeconds": "A String", # The duration of the ban. This property is only present if the banType is temporary. 218 "bannedUserDetails": { # The details of the user that was banned. 219 "channelId": "A String", # The YouTube channel ID. 220 "displayName": "A String", # The channel's display name. 221 "profileImageUrl": "A String", # The channels's avatar URL. 222 "channelUrl": "A String", # The channel's URL. 223 }, 224 "banType": "A String", # The type of ban. 225 }, 226 "liveChatId": "A String", 227 "authorChannelId": "A String", # The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase 228 "pollEditedDetails": { 229 "items": [ 230 { 231 "itemId": "A String", 232 "description": "A String", # Plain text description of the item. 233 }, 234 ], 235 "prompt": "A String", 236 "id": "A String", 237 }, 238 "textMessageDetails": { # Details about the text message, this is only set if the type is 'textMessageEvent'. 239 "messageText": "A String", # The user's message. 240 }, 241 "messageDeletedDetails": { 242 "deletedMessageId": "A String", 243 }, 244 "pollVotedDetails": { 245 "itemId": "A String", # The poll item the user chose. 246 "pollId": "A String", # The poll the user voted on. 247 }, 248 "pollOpenedDetails": { 249 "items": [ 250 { 251 "itemId": "A String", 252 "description": "A String", # Plain text description of the item. 253 }, 254 ], 255 "prompt": "A String", 256 "id": "A String", 257 }, 258 "type": "A String", # The type of message, this will always be present, it determines the contents of the message as well as which fields will be present. 259 "pollClosedDetails": { 260 "pollId": "A String", # The id of the poll that was closed. 261 }, 262 }, 263 "kind": "youtube#liveChatMessage", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage". 264 "etag": "A String", # Etag of this resource. 265 "authorDetails": { # The authorDetails object contains basic details about the user that posted this message. 266 "displayName": "A String", # The channel's display name. 267 "isChatModerator": True or False, # Whether the author is a moderator of the live chat. 268 "channelId": "A String", # The YouTube channel ID. 269 "isChatSponsor": True or False, # Whether the author is a sponsor of the live chat. 270 "profileImageUrl": "A String", # The channels's avatar URL. 271 "isChatOwner": True or False, # Whether the author is the owner of the live chat. 272 "isVerified": True or False, # Whether the author's identity has been verified by YouTube. 273 "channelUrl": "A String", # The channel's URL. 274 }, 275 "id": "A String", # The ID that YouTube assigns to uniquely identify the message. 276 }</pre> 277</div> 278 279<div class="method"> 280 <code class="details" id="list">list(liveChatId, part, profileImageSize=None, hl=None, maxResults=None, pageToken=None)</code> 281 <pre>Lists live chat messages for a specific chat. 282 283Args: 284 liveChatId: string, The liveChatId parameter specifies the ID of the chat whose messages will be returned. (required) 285 part: string, The part parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id and snippet. (required) 286 profileImageSize: integer, The profileImageSize parameter specifies the size of the user profile pictures that should be returned in the result set. Default: 88. 287 hl: string, The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. The parameter value must be a language code included in the list returned by the i18nLanguages.list method. 288 289If localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language. 290 maxResults: integer, The maxResults parameter specifies the maximum number of messages that should be returned in the result set. 291 pageToken: string, The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved. 292 293Returns: 294 An object of the form: 295 296 { 297 "eventId": "A String", # Serialized EventId of the request which produced this response. 298 "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. 299 "kind": "youtube#liveChatMessageListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessageListResponse". 300 "visitorId": "A String", # The visitorId identifies the visitor. 301 "items": [ # A list of live chat messages. 302 { # A liveChatMessage resource represents a chat message in a YouTube Live Chat. 303 "snippet": { # The snippet object contains basic details about the message. 304 "displayMessage": "A String", # Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent. 305 "messageRetractedDetails": { 306 "retractedMessageId": "A String", 307 }, 308 "superChatDetails": { # Details about the Super Chat event, this is only set if the type is 'superChatEvent'. 309 "tier": 42, # The tier in which the amount belongs to. Lower amounts belong to lower tiers. Starts at 1. 310 "currency": "A String", # The currency in which the purchase was made. 311 "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user. 312 "userComment": "A String", # The comment added by the user to this Super Chat event. 313 "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75). 314 }, 315 "fanFundingEventDetails": { # Details about the funding event, this is only set if the type is 'fanFundingEvent'. 316 "currency": "A String", # The currency in which the fund was made. 317 "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user. 318 "userComment": "A String", # The comment added by the user to this fan funding event. 319 "amountMicros": "A String", # The amount of the fund. 320 }, 321 "hasDisplayContent": True or False, # Whether the message has display content that should be displayed to users. 322 "publishedAt": "A String", # The date and time when the message was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. 323 "userBannedDetails": { 324 "banDurationSeconds": "A String", # The duration of the ban. This property is only present if the banType is temporary. 325 "bannedUserDetails": { # The details of the user that was banned. 326 "channelId": "A String", # The YouTube channel ID. 327 "displayName": "A String", # The channel's display name. 328 "profileImageUrl": "A String", # The channels's avatar URL. 329 "channelUrl": "A String", # The channel's URL. 330 }, 331 "banType": "A String", # The type of ban. 332 }, 333 "liveChatId": "A String", 334 "authorChannelId": "A String", # The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase 335 "pollEditedDetails": { 336 "items": [ 337 { 338 "itemId": "A String", 339 "description": "A String", # Plain text description of the item. 340 }, 341 ], 342 "prompt": "A String", 343 "id": "A String", 344 }, 345 "textMessageDetails": { # Details about the text message, this is only set if the type is 'textMessageEvent'. 346 "messageText": "A String", # The user's message. 347 }, 348 "messageDeletedDetails": { 349 "deletedMessageId": "A String", 350 }, 351 "pollVotedDetails": { 352 "itemId": "A String", # The poll item the user chose. 353 "pollId": "A String", # The poll the user voted on. 354 }, 355 "pollOpenedDetails": { 356 "items": [ 357 { 358 "itemId": "A String", 359 "description": "A String", # Plain text description of the item. 360 }, 361 ], 362 "prompt": "A String", 363 "id": "A String", 364 }, 365 "type": "A String", # The type of message, this will always be present, it determines the contents of the message as well as which fields will be present. 366 "pollClosedDetails": { 367 "pollId": "A String", # The id of the poll that was closed. 368 }, 369 }, 370 "kind": "youtube#liveChatMessage", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage". 371 "etag": "A String", # Etag of this resource. 372 "authorDetails": { # The authorDetails object contains basic details about the user that posted this message. 373 "displayName": "A String", # The channel's display name. 374 "isChatModerator": True or False, # Whether the author is a moderator of the live chat. 375 "channelId": "A String", # The YouTube channel ID. 376 "isChatSponsor": True or False, # Whether the author is a sponsor of the live chat. 377 "profileImageUrl": "A String", # The channels's avatar URL. 378 "isChatOwner": True or False, # Whether the author is the owner of the live chat. 379 "isVerified": True or False, # Whether the author's identity has been verified by YouTube. 380 "channelUrl": "A String", # The channel's URL. 381 }, 382 "id": "A String", # The ID that YouTube assigns to uniquely identify the message. 383 }, 384 ], 385 "tokenPagination": { # Stub token pagination template to suppress results. 386 }, 387 "etag": "A String", # Etag of this resource. 388 "pollingIntervalMillis": 42, # The amount of time the client should wait before polling again. 389 "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page. 390 "totalResults": 42, # The total number of results in the result set. 391 "resultsPerPage": 42, # The number of results included in the API response. 392 }, 393 "offlineAt": "A String", # The date and time when the underlying stream went offline. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. 394 }</pre> 395</div> 396 397<div class="method"> 398 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 399 <pre>Retrieves the next page of results. 400 401Args: 402 previous_request: The request for the previous page. (required) 403 previous_response: The response from the request for the previous page. (required) 404 405Returns: 406 A request object that you can call 'execute()' on to request the next 407 page. Returns None if there are no more items in the collection. 408 </pre> 409</div> 410 411</body></html>