pub struct ChannelsApi<'a> { /* private fields */ }Expand description
Channels API - handles all channel-related endpoints
Implementations§
Source§impl<'a> ChannelsApi<'a>
impl<'a> ChannelsApi<'a>
Sourcepub async fn get(&self, channel_slug: &str) -> Result<Channel>
pub async fn get(&self, channel_slug: &str) -> Result<Channel>
Get a channel by slug
Requires OAuth token with channel:read scope
§Example
let channel = client.channels().get("xqc").await?;
println!("Channel: {}", channel.slug);Sourcepub async fn update(&self, request: UpdateChannelRequest) -> Result<()>
pub async fn update(&self, request: UpdateChannelRequest) -> Result<()>
Update channel/livestream metadata
Requires OAuth token with channel:write scope.
At least one field in the request must be set.
§Example
use kick_api::UpdateChannelRequest;
let update = UpdateChannelRequest {
stream_title: Some("New title!".to_string()),
category_id: None,
custom_tags: Some(vec!["rust".to_string()]),
};
client.channels().update(update).await?;Auto Trait Implementations§
impl<'a> Freeze for ChannelsApi<'a>
impl<'a> !RefUnwindSafe for ChannelsApi<'a>
impl<'a> Send for ChannelsApi<'a>
impl<'a> Sync for ChannelsApi<'a>
impl<'a> Unpin for ChannelsApi<'a>
impl<'a> UnsafeUnpin for ChannelsApi<'a>
impl<'a> !UnwindSafe for ChannelsApi<'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