Crate twitch_comment_stream

Crate twitch_comment_stream 

Source
Expand description

Twitchのコメントストリームを簡単に扱うためのライブラリ。

このライブラリを使用すると、指定したTwitchチャンネルのコメントを 非同期にストリーミングすることができます。

§使用例

use twitch_comment_stream::TwitchCommentStream;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut stream = TwitchCommentStream::new("チャンネル名".to_string());
    stream.connect().await?;

    while let Ok(comment) = stream.next().await {
        println!("{}: {}", comment.user, comment.body);
    }

    Ok(())
}

Structs§

Comment
TwitchCommentStream