pub struct KickApiClient { /* private fields */ }Expand description
Main Kick API client
§Example
use kick_api::KickApiClient;
// Without authentication (limited endpoints)
let client = KickApiClient::new();
// With OAuth token
let client = KickApiClient::with_token("your_token_here".to_string());
// Use the API modules
let channel = client.channels().get("xqc").await?;
let rewards = client.rewards().get_all().await?;Implementations§
Source§impl KickApiClient
impl KickApiClient
Sourcepub fn with_token(token: String) -> Self
pub fn with_token(token: String) -> Self
Create a client with OAuth authentication
§Parameters
token: Your OAuth access token from the authorization flow
Sourcepub fn channels(&self) -> ChannelsApi<'_>
pub fn channels(&self) -> ChannelsApi<'_>
Access the Channels API
§Example
let channel = client.channels().get("xqc").await?;
let my_channels = client.channels().get_mine().await?;Sourcepub fn rewards(&self) -> RewardsApi<'_>
pub fn rewards(&self) -> RewardsApi<'_>
Access the Rewards API
§Example
let rewards = client.rewards().get_all().await?;
let reward = client.rewards().create(request).await?;Sourcepub fn users(&self) -> UsersApi<'_>
pub fn users(&self) -> UsersApi<'_>
Access the Users API
§Example
let me = client.users().get_me().await?;
let users = client.users().get(vec![123, 456]).await?;
let token_info = client.users().introspect_token().await?;Sourcepub fn chat(&self) -> ChatApi<'_>
pub fn chat(&self) -> ChatApi<'_>
Access the Chat API
§Example
let response = client.chat().send_message(request).await?;
client.chat().delete_message("msg_id").await?;Sourcepub fn moderation(&self) -> ModerationApi<'_>
pub fn moderation(&self) -> ModerationApi<'_>
Access the Moderation API
§Example
client.moderation().ban(ban_request).await?;
client.moderation().unban(unban_request).await?;Trait Implementations§
Source§impl Clone for KickApiClient
impl Clone for KickApiClient
Source§fn clone(&self) -> KickApiClient
fn clone(&self) -> KickApiClient
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 KickApiClient
impl Debug for KickApiClient
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