Bilibili REST API
The second Rust implementation on GitHub of third-party REST API client for Bilibili. Designed to be lightweight and efficient.
It's formerly livekit-api
(LiveKit), so there are only a few APIs related to Bilibili Live. More APIs will be implemented later. PRs are also welcomed.
-
Abstract the API to the trait
RestApi
, bringing both clear readable code and reduced runtime overhead. And you are able to implement your own API! -
Directly based on
hyper
, reducing the redundancy ofreqwest
which brings more binary size. -
Parse
Access
from cookies for requests that require login.
use bilibili_restapi::{client::Client, live::info::GetRoomInfo};
let client = Client::new_bare();
let room_info = client.call(&GetRoomInfo { sroomid: 23590843 }).await.unwrap();
assert_eq!(room_info.uid, 573732342);
println!("{:?}", room_info);