pub struct ChannelInfo {Show 14 fields
pub id: u64,
pub user_id: u64,
pub slug: String,
pub is_banned: bool,
pub vod_enabled: bool,
pub subscription_enabled: bool,
pub is_affiliate: bool,
pub verified: bool,
pub followers_count: u64,
pub can_host: bool,
pub chatroom: ChatroomInfo,
pub subscriber_badges: Vec<SubscriberBadge>,
pub user: Option<ChannelUser>,
pub livestream: Option<LivestreamInfo>,
}Expand description
Public channel information from Kick’s v2 API.
Returned by fetch_channel_info. Contains
chatroom settings, subscriber badges, user profile, and livestream status.
No authentication is required.
§Example
use kick_api::fetch_channel_info;
let info = fetch_channel_info("xqc").await?;
println!("Chatroom ID: {}", info.chatroom.id);
println!("Followers: {}", info.followers_count);
if let Some(stream) = &info.livestream {
println!("Live: {} viewers", stream.viewer_count);
}Fields§
§id: u64Channel ID
user_id: u64User ID of the broadcaster
slug: StringChannel URL slug
is_banned: boolWhether the channel is banned
vod_enabled: boolWhether VODs are enabled
subscription_enabled: boolWhether subscriptions are enabled
is_affiliate: boolWhether the channel is a Kick affiliate
verified: boolWhether the channel is verified
followers_count: u64Number of followers
can_host: boolWhether the channel can host other channels
chatroom: ChatroomInfoChatroom settings
subscriber_badges: Vec<SubscriberBadge>Subscriber badge tiers
user: Option<ChannelUser>Broadcaster’s user profile
livestream: Option<LivestreamInfo>Current livestream info (None if offline)
Trait Implementations§
Source§impl Clone for ChannelInfo
impl Clone for ChannelInfo
Source§fn clone(&self) -> ChannelInfo
fn clone(&self) -> ChannelInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelInfo
impl Debug for ChannelInfo
Source§impl<'de> Deserialize<'de> for ChannelInfo
impl<'de> Deserialize<'de> for ChannelInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ChannelInfo
impl RefUnwindSafe for ChannelInfo
impl Send for ChannelInfo
impl Sync for ChannelInfo
impl Unpin for ChannelInfo
impl UnsafeUnpin for ChannelInfo
impl UnwindSafe for ChannelInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more