Struct miHoYo_API::client::Client
source · pub struct Client<'a> { /* private fields */ }Expand description
A Client which can
Implementations§
source§impl Client<'_>
impl Client<'_>
To Connect with HTTP(S) so need setting Cookies
sourcepub fn set_from_env<'a>(&mut self) -> Result<Self>
pub fn set_from_env<'a>(&mut self) -> Result<Self>
setting cookies from .env file.
sourcepub async fn get_game_accounts(
&self,
lang: Option<Languages>
) -> Result<Vec<Account>>
pub async fn get_game_accounts( &self, lang: Option<Languages> ) -> Result<Vec<Account>>
Get the accounts that miHoYo game as listed in Vec
- Genshin
- Honkai 3rd
- StarRail
sourcepub async fn get_game_account(
&self,
lang: Option<Languages>,
game: Game
) -> Option<Account>
pub async fn get_game_account( &self, lang: Option<Languages>, game: Game ) -> Option<Account>
You can set the Game you want
pub async fn get_record_cards( &self, hoyolab_id: Option<u32>, lang: Option<Languages> ) -> Result<Vec<RecordCard>>
pub async fn get_genshin_notes( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<GenshinNote>
pub async fn get_genshin_partial_user( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<PartialUser>
pub async fn get_genshin_characters( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<Characters>
pub async fn get_genshin_user( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<UserWithCharacters>
pub async fn get_genshin_activities( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<()>
👎Deprecated: It so annoying to write A model for Deserialize. Its killed me.
pub async fn get_genshin_spiral_abyss( &self, uid: Option<u32>, previous: Option<bool>, lang: Option<Languages> ) -> Result<SpiralAbyss>
pub async fn get_starrail_notes( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<StarRailNote>
pub async fn get_starrail_user( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<UserStats>
pub async fn get_starrail_characters( &self, uid: Option<u32>, lang: Option<Languages> ) -> Result<Vec<CharacterDetails>>
pub async fn get_starrail_challenge( &self, uid: Option<u32>, previous: Option<bool>, lang: Option<Languages> ) -> Result<Challenge>
pub async fn get_starrail_rogue( &self, uid: Option<u32>, schedule_type: Option<i32>, lang: Option<Languages> ) -> Result<Rogue>
pub async fn get_starrail_preview( &self, uid: u32, lang: Option<&str> ) -> Result<Mihomo>
pub async fn get_starrail_preview_characters( &self, uid: u32, lang: Option<&str> ) -> Result<Vec<Characters>>
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Client<'a>
impl<'a> Send for Client<'a>
impl<'a> Sync for Client<'a>
impl<'a> Unpin for Client<'a>
impl<'a> UnwindSafe for Client<'a>
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