pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub async fn search_anime(&self, search: &str) -> Result<SearchDTO, Error>
pub async fn search_anime(&self, search: &str) -> Result<SearchDTO, Error>
Searches for anime with a given search string.
§Example
let client = animebytes_rs::Client::new("password", "username")?;
let search_result = client.search_anime("hyouka").await?;
println!("{:?}", search_result);
Ok(())§Errors
This method will fail if there’s any issue with username, password or if there’s an HTTP error.
Source§impl Client
impl Client
Sourcepub async fn stats(&self) -> Result<StatsDTO, Error>
pub async fn stats(&self) -> Result<StatsDTO, Error>
Returns basic information about the tracker, auth required.
let client = animebytes_rs::Client::new("password", "username")?;
let search_result = client.stats().await?;
println!("{:?}", search_result);
Ok(())§Errors
This method can fail if the torrent password is invalid or if there is a general http error.
Source§impl Client
impl Client
Sourcepub async fn status(&self) -> Result<StatusDTO, Error>
pub async fn status(&self) -> Result<StatusDTO, Error>
Returns basic information about the tracker, auth required.
let client = animebytes_rs::Client::new("password", "username")?;
let search_result = client.status().await?;
println!("{:?}", search_result);
Ok(())§Errors
This method can fail if there is a general HTTP error.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more