pub struct LivestreamsApi<'a> { /* private fields */ }Expand description
Livestreams API - query live streams and global stats
Implementations§
Source§impl<'a> LivestreamsApi<'a>
impl<'a> LivestreamsApi<'a>
Sourcepub async fn get(
&self,
broadcaster_user_ids: Option<Vec<u64>>,
category_id: Option<u32>,
language: Option<&str>,
sort: Option<LivestreamSort>,
limit: Option<u32>,
) -> Result<Vec<Livestream>>
pub async fn get( &self, broadcaster_user_ids: Option<Vec<u64>>, category_id: Option<u32>, language: Option<&str>, sort: Option<LivestreamSort>, limit: Option<u32>, ) -> Result<Vec<Livestream>>
Get currently live streams
Works with both User Access Tokens and App Access Tokens (no special scope required).
§Parameters
broadcaster_user_ids: Filter by specific broadcaster IDs (max 50)category_id: Filter by categorylanguage: Filter by language code (e.g., “en”)sort: Sort order (defaults toViewerCount)limit: Number of results (1-100, defaults to 25)
§Example
// Get top live streams
let streams = client.livestreams().get(None, None, None, None, None).await?;
// Get specific broadcasters
let streams = client.livestreams().get(
Some(vec![12345, 67890]),
None, None, None, None,
).await?;Sourcepub async fn stats(&self) -> Result<LivestreamStats>
pub async fn stats(&self) -> Result<LivestreamStats>
Get global livestream statistics
Returns the total number of live streams on Kick. Works with both User Access Tokens and App Access Tokens.
§Example
let stats = client.livestreams().stats().await?;
println!("Total live streams: {}", stats.total_count);Auto Trait Implementations§
impl<'a> Freeze for LivestreamsApi<'a>
impl<'a> !RefUnwindSafe for LivestreamsApi<'a>
impl<'a> Send for LivestreamsApi<'a>
impl<'a> Sync for LivestreamsApi<'a>
impl<'a> Unpin for LivestreamsApi<'a>
impl<'a> UnsafeUnpin for LivestreamsApi<'a>
impl<'a> !UnwindSafe for LivestreamsApi<'a>
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