pub struct KickApiClient { /* private fields */ }Expand description
Main HTTP client for Kick API operations
Implementations§
Source§impl KickApiClient
impl KickApiClient
Sourcepub fn new() -> FetchResult<Self>
pub fn new() -> FetchResult<Self>
Create a new Kick API client with default configuration
Sourcepub fn with_config(config: ClientConfig) -> FetchResult<Self>
pub fn with_config(config: ClientConfig) -> FetchResult<Self>
Create a new Kick API client with custom configuration
Sourcepub fn with_full_config(
client_config: ClientConfig,
strategy_config: StrategyConfig,
) -> FetchResult<Self>
pub fn with_full_config( client_config: ClientConfig, strategy_config: StrategyConfig, ) -> FetchResult<Self>
Create a client with both client and strategy configurations
Sourcepub async fn get_channel(&self, channel_name: &str) -> FetchResult<ChannelInfo>
pub async fn get_channel(&self, channel_name: &str) -> FetchResult<ChannelInfo>
Fetch channel information by channel name This is the main method that uses the official API endpoint
Sourcepub async fn channel_exists(&self, channel_name: &str) -> FetchResult<bool>
pub async fn channel_exists(&self, channel_name: &str) -> FetchResult<bool>
Check if channel exists (faster version that only gets basic info)
Sourcepub async fn get_channel_id(&self, channel_name: &str) -> FetchResult<u64>
pub async fn get_channel_id(&self, channel_name: &str) -> FetchResult<u64>
Get channel ID only (lightweight request)
Sourcepub async fn get_chatroom_id(&self, channel_name: &str) -> FetchResult<u64>
pub async fn get_chatroom_id(&self, channel_name: &str) -> FetchResult<u64>
Get chatroom ID only (for WebSocket subscription)
Sourcepub async fn get_channels(
&self,
channel_names: &[&str],
) -> Vec<FetchResult<ChannelInfo>> ⓘ
pub async fn get_channels( &self, channel_names: &[&str], ) -> Vec<FetchResult<ChannelInfo>> ⓘ
Get multiple channels in parallel
Sourcepub async fn get_metrics(&self) -> FetchMetrics
pub async fn get_metrics(&self) -> FetchMetrics
Get current metrics
Sourcepub async fn reset_metrics(&self)
pub async fn reset_metrics(&self)
Reset metrics
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clear cache
Sourcepub fn strategy_names(&self) -> Vec<&'static str>
pub fn strategy_names(&self) -> Vec<&'static str>
Get available strategy names
Sourcepub async fn test_connection(&self) -> FetchResult<()>
pub async fn test_connection(&self) -> FetchResult<()>
Test connection to Kick API
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KickApiClient
impl !RefUnwindSafe for KickApiClient
impl Send for KickApiClient
impl Sync for KickApiClient
impl Unpin for KickApiClient
impl !UnwindSafe for KickApiClient
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