7 个版本
0.7.0-rc.7 | 2023 年 9 月 17 日 |
---|---|
0.7.0-rc.6 | 2023 年 5 月 1 日 |
0.7.0-rc.4 | 2023 年 1 月 21 日 |
0.7.0-rc.3 | 2022 年 12 月 19 日 |
0.1.1 |
|
#6 在 #twitch
251 每月下载量
1.5MB
25K SLoC
Twitch API | 用于与 Twitch 新 API(即“Helix”、EventSub 等)进行通信的 Rust 库!
请参阅 文档 了解更多信息。
请参阅 示例。如果您想在本地上运行它们,请确保您首先 获取 Git 子模块。
use twitch_api::helix::HelixClient;
use twitch_api::twitch_oauth2::{AccessToken, UserToken};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
// Create the HelixClient, which is used to make requests to the Twitch API
let client: HelixClient<reqwest::Client> = HelixClient::default();
// Create a UserToken, which is used to authenticate requests
let token = UserToken::from_token(&client, AccessToken::from("mytoken")).await?;
println!(
"Channel: {:?}",
client.get_channel_from_login("twitchdev", &token).await?
);
Ok(())
}
注意
此软件包以前可用作 twitch_api2
,并已重命名为 twitch_api
目标
此软件包旨在针对
此 crate 还可用于
目前没有计划支持
- GraphQL
- Drops(除了 Helix 中的内容)
- Twitch IRC 聊天,使用museun/twitch_message或robotty/twitch-irc
- 身份验证,使用twitch-rs/twitch_oauth2
- 未记录的 Helix 端点,即移动 Twitch 应用使用的端点。包括工作“隐藏”端点
许可证
根据您的选择,受Apache License,版本 2.0或MIT 许可证许可。除非您明确声明,否则根据 Apache-2.0 许可证定义的,您有意提交以包含在此 crate 中的任何贡献,应如上所述双重许可,不附加任何额外的条款或条件。
依赖项
~2-19MB
~314K SLoC