pub struct MLBApi { /* private fields */ }Expand description
MLB API object
Implementations§
Source§impl MLBApi
impl MLBApi
pub async fn get_todays_schedule(&self) -> ApiResult<ScheduleResponse>
pub async fn get_schedule_date( &self, date: NaiveDate, ) -> ApiResult<ScheduleResponse>
pub async fn get_live_data(&self, game_id: u64) -> ApiResult<LiveResponse>
pub async fn get_win_probability( &self, game_id: u64, ) -> ApiResult<WinProbabilityResponse>
Sourcepub async fn get_season_info(&self, year: i32) -> ApiResult<Option<SeasonInfo>>
pub async fn get_season_info(&self, year: i32) -> ApiResult<Option<SeasonInfo>>
Fetch season info from the MLB API for a given year.
pub async fn get_standings( &self, date: NaiveDate, game_type: GameType, ) -> ApiResult<StandingsResponse>
pub async fn get_team_stats( &self, group: StatGroup, game_type: GameType, ) -> ApiResult<StatsResponse>
pub async fn get_team_stats_on_date( &self, group: StatGroup, date: NaiveDate, game_type: GameType, ) -> ApiResult<StatsResponse>
pub async fn get_player_stats( &self, group: StatGroup, game_type: GameType, ) -> ApiResult<StatsResponse>
pub async fn get_player_stats_on_date( &self, group: StatGroup, date: NaiveDate, game_type: GameType, ) -> ApiResult<StatsResponse>
pub async fn get_teams(&self, sport_ids: &[SportId]) -> ApiResult<TeamsResponse>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MLBApi
impl !RefUnwindSafe for MLBApi
impl Send for MLBApi
impl Sync for MLBApi
impl Unpin for MLBApi
impl UnsafeUnpin for MLBApi
impl !UnwindSafe for MLBApi
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