pub struct CharactersClient { /* private fields */ }
Implementations§
Source§impl CharactersClient
impl CharactersClient
Sourcepub async fn get(
&self,
request_builder: RequestBuilder,
) -> Result<Vec<Character>, Box<dyn Error + Send + Sync + 'static>>
pub async fn get( &self, request_builder: RequestBuilder, ) -> Result<Vec<Character>, Box<dyn Error + Send + Sync + 'static>>
Receives a configured RequestBuilder an returns a result containing a collection
Source§impl CharactersClient
impl CharactersClient
Sourcepub async fn get_by_game_id(
&self,
game_id: usize,
limit: usize,
) -> Result<Vec<Character>, Box<dyn Error + Send + Sync + 'static>>
pub async fn get_by_game_id( &self, game_id: usize, limit: usize, ) -> Result<Vec<Character>, Box<dyn Error + Send + Sync + 'static>>
Retrieves the characters for a given game id
§Examples
use igdb_rs::client::IGDBClient;
let igdb_client = IGDBClient::new("api-key");
let characters_client = igdb_client.characters();
///Retrieve 8 first characters for The Witcher 3 game
let characters = characters_client.get_by_game_id(1942, 8);
Auto Trait Implementations§
impl Freeze for CharactersClient
impl RefUnwindSafe for CharactersClient
impl Send for CharactersClient
impl Sync for CharactersClient
impl Unpin for CharactersClient
impl UnwindSafe for CharactersClient
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