pub struct ChatApi<'a> { /* private fields */ }Expand description
Chat API - handles chat message endpoints
Scopes required: chat:write, moderation:chat_message:manage
Implementations§
Source§impl<'a> ChatApi<'a>
impl<'a> ChatApi<'a>
Sourcepub async fn send_message(
&self,
request: SendMessageRequest,
) -> Result<SendMessageResponse>
pub async fn send_message( &self, request: SendMessageRequest, ) -> Result<SendMessageResponse>
Send a chat message
Requires OAuth token with chat:write scope
§Example
use kick_api::SendMessageRequest;
let request = SendMessageRequest {
r#type: "user".to_string(),
content: "Hello chat!".to_string(),
broadcaster_user_id: Some(12345),
reply_to_message_id: None,
};
let response = client.chat().send_message(request).await?;
println!("Message sent: {}", response.message_id);Auto Trait Implementations§
impl<'a> Freeze for ChatApi<'a>
impl<'a> !RefUnwindSafe for ChatApi<'a>
impl<'a> Send for ChatApi<'a>
impl<'a> Sync for ChatApi<'a>
impl<'a> Unpin for ChatApi<'a>
impl<'a> !UnwindSafe for ChatApi<'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