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>
pub async fn get_season_info(&self, year: i32) -> ApiResult<Option<SeasonInfo>>
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>
Sourcepub async fn get_player_profile(
&self,
person_id: u64,
group: StatGroup,
season: i32,
game_type: GameType,
) -> ApiResult<PeopleResponse>
pub async fn get_player_profile( &self, person_id: u64, group: StatGroup, season: i32, game_type: GameType, ) -> ApiResult<PeopleResponse>
Fetch player bio and all stats in a single hydrated call.
pub async fn get_team_schedule( &self, team_id: u16, season: i32, ) -> ApiResult<ScheduleResponse>
pub async fn get_team_roster( &self, team_id: u16, season: i32, roster_type: RosterType, ) -> ApiResult<RosterResponse>
pub async fn get_team_transactions( &self, team_id: u16, start_date: NaiveDate, end_date: NaiveDate, ) -> ApiResult<TransactionsResponse>
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