[−][src]Struct rarbg_api::RarBgApi
Implementations
impl RarBgApi
[src]
pub fn app_id(&self) -> &str
[src]
Return the name of your app.
Example
use rarbg_api::RarBgApi; let api = RarBgApi::new("example"); assert_eq!("example", api.app_id())
pub fn token(&self) -> &Token
[src]
Return the token associate to your app.
Example
use rarbg_api::RarBgApi; use rarbg_api::token::Token; let api = RarBgApi::new("example"); let token: &Token = api.token();
pub fn new(app_id: &str) -> Self
[src]
Create a new RARBG client.
Arguments
app_id
- A string slice that holds the name of your app.
Example
use rarbg_api::RarBgApi; let api = RarBgApi::new("example");
pub fn list(
&mut self,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
[src]
&mut self,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
List the torrents avalaible depending on parameters given.
Example
use rarbg_api::RarBgApi; let mut api = RarBgApi::new("example"); // It will get the 25 last ranked torrents let result = api.list(None);
pub fn search(
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
[src]
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
Search torrents by its name with some or no parameters.
Example
use rarbg_api::RarBgApi; let mut api = RarBgApi::new("example"); let result = api.search("Rick and Morty", None);
pub fn search_by_imdb(
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
[src]
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
Search torrents by its IMDB id with some or no parameters.
Example
use rarbg_api::RarBgApi; let mut api = RarBgApi::new("example"); // tt2861424 is Rick and Morty let result = api.search_by_imdb("tt2861424", None);
pub fn search_by_tvdb(
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
[src]
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
Search torrents by its TVDB id with some or no parameters.
Example
use rarbg_api::RarBgApi; let mut api = RarBgApi::new("example"); // 275274 is Rick and Morty let result = api.search_by_tvdb("275274", None);
pub fn search_by_tmdb(
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
[src]
&mut self,
value: &str,
parameters: Option<&ApiParameters>
) -> Result<Torrents, Error>
Search torrents by its TMDB id with some or no parameters.
Example
use rarbg_api::RarBgApi; let mut api = RarBgApi::new("example"); // 60625 is Rick and Morty let result = api.search_by_tmdb("60625", None);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RarBgApi
impl Send for RarBgApi
impl Sync for RarBgApi
impl Unpin for RarBgApi
impl UnwindSafe for RarBgApi
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,