5 个版本 (3 个破坏性更新)
0.6.1 | 2021年11月20日 |
---|---|
0.5.2 | 2021年11月20日 |
0.3.0 | 2021年11月18日 |
0.2.0 | 2021年11月6日 |
0.1.0 |
|
#15 in #ads
56KB
986 行
sponsor-block
A Rust 对 SponsorBlock API 的封装,你可以在这里找到完整的文档。
使用根据 CC BY-NC-SA 4.0 许可证从 https://sponsor.ajay.app/ 获得的 SponsorBlock 数据。有关更多信息,请参阅 SponsorBlock 数据库和 API 许可证。
此库仍然缺少完整 API 的许多功能,但包含许多用于使用此服务的必要分段检索功能。
有关库文档,请访问 docs.rs。
示例
以下是一个如何获取视频段落的简短示例
use sponsor_block::{AcceptedCategories, Client};
// This should be random, treated like a password, and stored across sessions
const USER_ID: &str = "your local user id";
let client = Client::new(USER_ID);
let video_segments = client
.fetch_segments("7U-RbOKanYs", AcceptedCategories::all())
.await
.ok();
// Then do something with your video segments...
项目许可证
此项目受以下任一许可证的许可
- Apache 许可证 2.0 版,(LICENSE-APACHE 或 https://apache.ac.cn/licenses/LICENSE-2.0)
- MIT 许可证 (LICENSE-MIT 或 http://opensource.org/licenses/MIT)
任选其一。
贡献
除非你明确说明,否则你提交给 sponsor-block 的任何有意贡献,根据 Apache-2.0 许可证的定义,应按照上述方式双重许可,不附加任何其他条款或条件。
依赖关系
~4–17MB
~252K SLoC