Learn R Programming

tuber (version 3.0.0)

list_live_chat_messages: List Live Chat Messages

Description

Retrieves live chat messages for a specific live chat. Note that live chat messages can only be retrieved for active live broadcasts.

Usage

list_live_chat_messages(
  live_chat_id,
  part = "snippet,authorDetails",
  language = NULL,
  max_results = 500,
  page_token = NULL,
  profile_image_size = NULL,
  simplify = TRUE
)

Value

A data.frame or list of live chat messages.

Arguments

live_chat_id

Character. The id of the live chat.

part

Character. Parts to retrieve. Valid values are "snippet", "authorDetails". Default is "snippet,authorDetails".

language

Optional language code for localized text.

max_results

Maximum total number of messages to return. YouTube serves live chat in pages of at least 200 messages, so when fewer than 200 are still wanted the surplus on the last page is dropped and the returned `nextPageToken` continues after that page, not after the last message.

page_token

Character. Specific page token to retrieve. Optional.

profile_image_size

Integer. Size of the profile image to return. Optional.

simplify

Logical. Whether to return a simplified data.frame. Default is TRUE.

References

https://developers.google.com/youtube/v3/live/docs/liveChatMessages/list

Examples

Run this code
if (FALSE) {
# Set API token via yt_oauth() first

messages <- list_live_chat_messages(live_chat_id = "Cg0KC...")
}

Run the code above in your browser using DataLab