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. Lower amounts belong to lower tiers. The lowest tier is 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      "superStickerDetails": { # Details about the Super Sticker event, this is only set if the type is 'superStickerEvent'.
128        "tier": 42, # The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1.
129        "currency": "A String", # The currency in which the purchase was made.
130        "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user.
131        "superStickerMetadata": { # Information about the Super Sticker.
132          "altText": "A String", # Internationalized alt text that describes the sticker image and any animation associated with it.
133          "altTextLanguage": "A String", # Specifies the localization language in which the alt text is returned.
134          "stickerId": "A String", # Unique identifier of the Super Sticker. This is a shorter form of the alt_text that includes pack name and a recognizable characteristic of the sticker.
135        },
136        "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75).
137      },
138      "hasDisplayContent": True or False, # Whether the message has display content that should be displayed to users.
139      "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.
140      "userBannedDetails": {
141        "banDurationSeconds": "A String", # The duration of the ban. This property is only present if the banType is temporary.
142        "bannedUserDetails": { # The details of the user that was banned.
143          "channelId": "A String", # The YouTube channel ID.
144          "displayName": "A String", # The channel's display name.
145          "profileImageUrl": "A String", # The channels's avatar URL.
146          "channelUrl": "A String", # The channel's URL.
147        },
148        "banType": "A String", # The type of ban.
149      },
150      "liveChatId": "A String",
151      "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
152      "pollEditedDetails": {
153        "items": [
154          {
155            "itemId": "A String",
156            "description": "A String", # Plain text description of the item.
157          },
158        ],
159        "prompt": "A String",
160        "id": "A String",
161      },
162      "textMessageDetails": { # Details about the text message, this is only set if the type is 'textMessageEvent'.
163        "messageText": "A String", # The user's message.
164      },
165      "messageDeletedDetails": {
166        "deletedMessageId": "A String",
167      },
168      "pollVotedDetails": {
169        "itemId": "A String", # The poll item the user chose.
170        "pollId": "A String", # The poll the user voted on.
171      },
172      "pollOpenedDetails": {
173        "items": [
174          {
175            "itemId": "A String",
176            "description": "A String", # Plain text description of the item.
177          },
178        ],
179        "prompt": "A String",
180        "id": "A String",
181      },
182      "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.
183      "pollClosedDetails": {
184        "pollId": "A String", # The id of the poll that was closed.
185      },
186    },
187    "kind": "youtube#liveChatMessage", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage".
188    "etag": "A String", # Etag of this resource.
189    "authorDetails": { # The authorDetails object contains basic details about the user that posted this message.
190      "displayName": "A String", # The channel's display name.
191      "isChatModerator": True or False, # Whether the author is a moderator of the live chat.
192      "channelId": "A String", # The YouTube channel ID.
193      "isChatSponsor": True or False, # Whether the author is a sponsor of the live chat.
194      "profileImageUrl": "A String", # The channels's avatar URL.
195      "isChatOwner": True or False, # Whether the author is the owner of the live chat.
196      "isVerified": True or False, # Whether the author's identity has been verified by YouTube.
197      "channelUrl": "A String", # The channel's URL.
198    },
199    "id": "A String", # The ID that YouTube assigns to uniquely identify the message.
200  }
201
202
203Returns:
204  An object of the form:
205
206    { # A liveChatMessage resource represents a chat message in a YouTube Live Chat.
207      "snippet": { # The snippet object contains basic details about the message.
208        "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.
209        "messageRetractedDetails": {
210          "retractedMessageId": "A String",
211        },
212        "superChatDetails": { # Details about the Super Chat event, this is only set if the type is 'superChatEvent'.
213          "tier": 42, # The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1.
214          "currency": "A String", # The currency in which the purchase was made.
215          "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user.
216          "userComment": "A String", # The comment added by the user to this Super Chat event.
217          "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75).
218        },
219        "fanFundingEventDetails": { # Details about the funding event, this is only set if the type is 'fanFundingEvent'.
220          "currency": "A String", # The currency in which the fund was made.
221          "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user.
222          "userComment": "A String", # The comment added by the user to this fan funding event.
223          "amountMicros": "A String", # The amount of the fund.
224        },
225        "superStickerDetails": { # Details about the Super Sticker event, this is only set if the type is 'superStickerEvent'.
226          "tier": 42, # The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1.
227          "currency": "A String", # The currency in which the purchase was made.
228          "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user.
229          "superStickerMetadata": { # Information about the Super Sticker.
230            "altText": "A String", # Internationalized alt text that describes the sticker image and any animation associated with it.
231            "altTextLanguage": "A String", # Specifies the localization language in which the alt text is returned.
232            "stickerId": "A String", # Unique identifier of the Super Sticker. This is a shorter form of the alt_text that includes pack name and a recognizable characteristic of the sticker.
233          },
234          "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75).
235        },
236        "hasDisplayContent": True or False, # Whether the message has display content that should be displayed to users.
237        "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.
238        "userBannedDetails": {
239          "banDurationSeconds": "A String", # The duration of the ban. This property is only present if the banType is temporary.
240          "bannedUserDetails": { # The details of the user that was banned.
241            "channelId": "A String", # The YouTube channel ID.
242            "displayName": "A String", # The channel's display name.
243            "profileImageUrl": "A String", # The channels's avatar URL.
244            "channelUrl": "A String", # The channel's URL.
245          },
246          "banType": "A String", # The type of ban.
247        },
248        "liveChatId": "A String",
249        "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
250        "pollEditedDetails": {
251          "items": [
252            {
253              "itemId": "A String",
254              "description": "A String", # Plain text description of the item.
255            },
256          ],
257          "prompt": "A String",
258          "id": "A String",
259        },
260        "textMessageDetails": { # Details about the text message, this is only set if the type is 'textMessageEvent'.
261          "messageText": "A String", # The user's message.
262        },
263        "messageDeletedDetails": {
264          "deletedMessageId": "A String",
265        },
266        "pollVotedDetails": {
267          "itemId": "A String", # The poll item the user chose.
268          "pollId": "A String", # The poll the user voted on.
269        },
270        "pollOpenedDetails": {
271          "items": [
272            {
273              "itemId": "A String",
274              "description": "A String", # Plain text description of the item.
275            },
276          ],
277          "prompt": "A String",
278          "id": "A String",
279        },
280        "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.
281        "pollClosedDetails": {
282          "pollId": "A String", # The id of the poll that was closed.
283        },
284      },
285      "kind": "youtube#liveChatMessage", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage".
286      "etag": "A String", # Etag of this resource.
287      "authorDetails": { # The authorDetails object contains basic details about the user that posted this message.
288        "displayName": "A String", # The channel's display name.
289        "isChatModerator": True or False, # Whether the author is a moderator of the live chat.
290        "channelId": "A String", # The YouTube channel ID.
291        "isChatSponsor": True or False, # Whether the author is a sponsor of the live chat.
292        "profileImageUrl": "A String", # The channels's avatar URL.
293        "isChatOwner": True or False, # Whether the author is the owner of the live chat.
294        "isVerified": True or False, # Whether the author's identity has been verified by YouTube.
295        "channelUrl": "A String", # The channel's URL.
296      },
297      "id": "A String", # The ID that YouTube assigns to uniquely identify the message.
298    }</pre>
299</div>
300
301<div class="method">
302    <code class="details" id="list">list(liveChatId, part, profileImageSize=None, hl=None, maxResults=None, pageToken=None)</code>
303  <pre>Lists live chat messages for a specific chat.
304
305Args:
306  liveChatId: string, The liveChatId parameter specifies the ID of the chat whose messages will be returned. (required)
307  part: string, The part parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id and snippet. (required)
308  profileImageSize: integer, The profileImageSize parameter specifies the size of the user profile pictures that should be returned in the result set. Default: 88.
309  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.
310
311If 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.
312  maxResults: integer, The maxResults parameter specifies the maximum number of messages that should be returned in the result set.
313  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.
314
315Returns:
316  An object of the form:
317
318    {
319    "eventId": "A String", # Serialized EventId of the request which produced this response.
320    "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.
321    "kind": "youtube#liveChatMessageListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessageListResponse".
322    "visitorId": "A String", # The visitorId identifies the visitor.
323    "items": [ # A list of live chat messages.
324      { # A liveChatMessage resource represents a chat message in a YouTube Live Chat.
325          "snippet": { # The snippet object contains basic details about the message.
326            "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.
327            "messageRetractedDetails": {
328              "retractedMessageId": "A String",
329            },
330            "superChatDetails": { # Details about the Super Chat event, this is only set if the type is 'superChatEvent'.
331              "tier": 42, # The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1.
332              "currency": "A String", # The currency in which the purchase was made.
333              "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user.
334              "userComment": "A String", # The comment added by the user to this Super Chat event.
335              "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75).
336            },
337            "fanFundingEventDetails": { # Details about the funding event, this is only set if the type is 'fanFundingEvent'.
338              "currency": "A String", # The currency in which the fund was made.
339              "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user.
340              "userComment": "A String", # The comment added by the user to this fan funding event.
341              "amountMicros": "A String", # The amount of the fund.
342            },
343            "superStickerDetails": { # Details about the Super Sticker event, this is only set if the type is 'superStickerEvent'.
344              "tier": 42, # The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1.
345              "currency": "A String", # The currency in which the purchase was made.
346              "amountDisplayString": "A String", # A rendered string that displays the fund amount and currency to the user.
347              "superStickerMetadata": { # Information about the Super Sticker.
348                "altText": "A String", # Internationalized alt text that describes the sticker image and any animation associated with it.
349                "altTextLanguage": "A String", # Specifies the localization language in which the alt text is returned.
350                "stickerId": "A String", # Unique identifier of the Super Sticker. This is a shorter form of the alt_text that includes pack name and a recognizable characteristic of the sticker.
351              },
352              "amountMicros": "A String", # The amount purchased by the user, in micros (1,750,000 micros = 1.75).
353            },
354            "hasDisplayContent": True or False, # Whether the message has display content that should be displayed to users.
355            "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.
356            "userBannedDetails": {
357              "banDurationSeconds": "A String", # The duration of the ban. This property is only present if the banType is temporary.
358              "bannedUserDetails": { # The details of the user that was banned.
359                "channelId": "A String", # The YouTube channel ID.
360                "displayName": "A String", # The channel's display name.
361                "profileImageUrl": "A String", # The channels's avatar URL.
362                "channelUrl": "A String", # The channel's URL.
363              },
364              "banType": "A String", # The type of ban.
365            },
366            "liveChatId": "A String",
367            "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
368            "pollEditedDetails": {
369              "items": [
370                {
371                  "itemId": "A String",
372                  "description": "A String", # Plain text description of the item.
373                },
374              ],
375              "prompt": "A String",
376              "id": "A String",
377            },
378            "textMessageDetails": { # Details about the text message, this is only set if the type is 'textMessageEvent'.
379              "messageText": "A String", # The user's message.
380            },
381            "messageDeletedDetails": {
382              "deletedMessageId": "A String",
383            },
384            "pollVotedDetails": {
385              "itemId": "A String", # The poll item the user chose.
386              "pollId": "A String", # The poll the user voted on.
387            },
388            "pollOpenedDetails": {
389              "items": [
390                {
391                  "itemId": "A String",
392                  "description": "A String", # Plain text description of the item.
393                },
394              ],
395              "prompt": "A String",
396              "id": "A String",
397            },
398            "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.
399            "pollClosedDetails": {
400              "pollId": "A String", # The id of the poll that was closed.
401            },
402          },
403          "kind": "youtube#liveChatMessage", # Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage".
404          "etag": "A String", # Etag of this resource.
405          "authorDetails": { # The authorDetails object contains basic details about the user that posted this message.
406            "displayName": "A String", # The channel's display name.
407            "isChatModerator": True or False, # Whether the author is a moderator of the live chat.
408            "channelId": "A String", # The YouTube channel ID.
409            "isChatSponsor": True or False, # Whether the author is a sponsor of the live chat.
410            "profileImageUrl": "A String", # The channels's avatar URL.
411            "isChatOwner": True or False, # Whether the author is the owner of the live chat.
412            "isVerified": True or False, # Whether the author's identity has been verified by YouTube.
413            "channelUrl": "A String", # The channel's URL.
414          },
415          "id": "A String", # The ID that YouTube assigns to uniquely identify the message.
416        },
417    ],
418    "tokenPagination": { # Stub token pagination template to suppress results.
419    },
420    "etag": "A String", # Etag of this resource.
421    "pollingIntervalMillis": 42, # The amount of time the client should wait before polling again.
422    "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page.
423      "totalResults": 42, # The total number of results in the result set.
424      "resultsPerPage": 42, # The number of results included in the API response.
425    },
426    "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.
427  }</pre>
428</div>
429
430<div class="method">
431    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
432  <pre>Retrieves the next page of results.
433
434Args:
435  previous_request: The request for the previous page. (required)
436  previous_response: The response from the request for the previous page. (required)
437
438Returns:
439  A request object that you can call 'execute()' on to request the next
440  page. Returns None if there are no more items in the collection.
441    </pre>
442</div>
443
444</body></html>