initial commit

This commit is contained in:
2026-07-18 12:44:28 -07:00
commit 18ae300d3f
15 changed files with 5902 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
//! Bilibili Web 与直播接口的异步客户端。
//!
//! 本 crate 不实现密码、二维码、验证码或 OAuth 登录流程。请通过 Bilibili 的正常登录页面
//! 获得会话,再将 `SESSDATA` 和 `bili_jct` 传给 [`Credentials`]。会改变账号状态的
//! Cookie 请求会自动携带 `csrf` 和 `csrf_token`。
//!
//! ```no_run
//! use libilibili::Client;
//!
//! # async fn example() -> Result<(), libilibili::Error> {
//! let client = Client::anonymous()?;
//! let room = client.live().room_init(5050).await?;
//! println!("{room:#}");
//! # Ok(()) }
//! ```
mod auth;
mod client;
mod endpoints;
mod error;
mod wbi;
#[cfg(feature = "websocket")]
pub mod websocket;
pub use auth::{Credentials, CredentialsBuilder};
pub use client::{Client, ClientBuilder, Response};
pub use endpoints::{CommentApi, LiveApi, SearchApi, UserApi, VideoApi};
pub use error::{ApiError, Error, Result};
pub use wbi::{WbiKey, WBI_MIXIN_TABLE};