Module twitch_api2::helix::chat::get_channel_chat_badges
source · [−]Available on crate feature
helix
only.Expand description
Gets a list of custom chat badges that can be used in chat for the specified channel. This includes subscriber badges and Bit badges.
get-channel-chat-badges
Accessing the endpoint
Request: GetChannelChatBadgesRequest
To use this endpoint, construct a GetChannelChatBadgesRequest
with the GetChannelChatBadgesRequest::builder()
method.
use twitch_api2::helix::chat::get_channel_chat_badges;
let request = get_channel_chat_badges::GetChannelChatBadgesRequest::builder()
.broadcaster_id("1234".to_string())
.build();
Response: BadgeSet
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix::{self, chat::get_channel_chat_badges};
let request = get_channel_chat_badges::GetChannelChatBadgesRequest::builder()
.broadcaster_id("1234".to_string())
.build();
let response: Vec<helix::chat::BadgeSet> = client.req_get(request, &token).await?.data;
You can also get the http::Request
with request.create_request(&token, &client_id)
and parse the http::Response
with GetChannelChatBadgesRequest::parse_response(None, &request.get_uri(), response)
Structs
Query Parameters for Get Channel Chat Badges
Type Definitions
Return Values for Get Channel Chat Badges