pub struct Puck { /* private fields */ }Implementations§
Source§impl Puck
§Puck util’s
impl Puck
§Puck util’s
Source§impl Puck
§Players
impl Puck
§Players
Sourcepub async fn get_player_career_stats(
&self,
id: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_player_career_stats( &self, id: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_player_game_log(
&self,
id: &str,
season: &str,
game_type: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_player_game_log( &self, id: &str, season: &str, game_type: &str, ) -> Result<IndexMap<String, Value>, Error>
Get game log for a player for a season and game type.
§Arguments
id- Player IDseason- Season stringgame_type- Game type (2=regular, 3=playoff)
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_player_game_log("8478402", "20232024", "2").await;
assert!(result.is_ok());
}Source§impl Puck
§Skaters
impl Puck
§Skaters
Sourcepub async fn get_current_skater_stats(
&self,
category: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_current_skater_stats( &self, category: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_current_skater_stats_season_game_type(
&self,
season: &str,
game_type: &str,
category: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_current_skater_stats_season_game_type( &self, season: &str, game_type: &str, category: &str, ) -> Result<IndexMap<String, Value>, Error>
Get skater stats leaders for a season and game type.
§Arguments
season- Season stringgame_type- Game typecategory- Stat category
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_current_skater_stats_season_game_type("20242025", "2", "").await;
assert!(result.is_ok());
}Source§impl Puck
§Goalies
impl Puck
§Goalies
Sourcepub async fn get_current_goalie_stats(
&self,
category: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_current_goalie_stats( &self, category: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_current_goalie_stats_season_game_type(
&self,
season: &str,
game_type: &str,
category: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_current_goalie_stats_season_game_type( &self, season: &str, game_type: &str, category: &str, ) -> Result<IndexMap<String, Value>, Error>
Get goalie stats leaders for a season and game type.
§Arguments
season- Season stringgame_type- Game typecategory- Stat category
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_current_goalie_stats_season_game_type("20242025", "2", "").await;
assert!(result.is_ok());
}Source§impl Puck
§Teams
impl Puck
§Teams
Sourcepub async fn get_team_standings(&self) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_standings(&self) -> Result<IndexMap<String, Value>, Error>
Get current team standings.
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_team_standings().await;
assert!(result.is_ok());
}Sourcepub async fn get_team_standings_date(
&self,
date: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_standings_date( &self, date: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_team_standings_season(
&self,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_standings_season( &self, ) -> Result<IndexMap<String, Value>, Error>
Get team standings for each season.
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_team_standings_season().await;
assert!(result.is_ok());
}Source§impl Puck
§Clubs
impl Puck
§Clubs
Sourcepub async fn get_club_stats_season(
&self,
team: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_club_stats_season( &self, team: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_club_stats_season_game_type(
&self,
team: &str,
season: &str,
game_type: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_club_stats_season_game_type( &self, team: &str, season: &str, game_type: &str, ) -> Result<IndexMap<String, Value>, Error>
Get club stats for a season and game type.
§Arguments
team- Team codeseason- Season stringgame_type- Game type
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_club_stats_season_game_type("TOR", "20232024", "2").await;
assert!(result.is_ok());
}Source§impl Puck
§Roster
impl Puck
§Roster
Sourcepub async fn get_team_roster_season(
&self,
team: &str,
season: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_roster_season( &self, team: &str, season: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_team_played_seasons(
&self,
team: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_played_seasons( &self, team: &str, ) -> Result<IndexMap<String, Value>, Error>
Source§impl Puck
§Scores
impl Puck
§Scores
Sourcepub async fn get_scores_now(&self) -> Result<IndexMap<String, Value>, Error>
pub async fn get_scores_now(&self) -> Result<IndexMap<String, Value>, Error>
Get daily scores as of now.
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_scores_now().await;
assert!(result.is_ok());
}Source§impl Puck
§Game
impl Puck
§Game
Sourcepub async fn get_play_by_play(
&self,
game_id: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_play_by_play( &self, game_id: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_landing_page(
&self,
game_id: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_landing_page( &self, game_id: &str, ) -> Result<IndexMap<String, Value>, Error>
Source§impl Puck
§Schedule
impl Puck
§Schedule
Sourcepub async fn get_team_schedule_now(
&self,
team: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_schedule_now( &self, team: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_team_schedule_season(
&self,
team: &str,
season: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_schedule_season( &self, team: &str, season: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_team_schedule_now_month(
&self,
team: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_schedule_now_month( &self, team: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_team_schedule_at_month(
&self,
team: &str,
month: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_schedule_at_month( &self, team: &str, month: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_team_schedule_at_week(
&self,
team: &str,
date: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_schedule_at_week( &self, team: &str, date: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_team_schedule_now_week(
&self,
team: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_team_schedule_now_week( &self, team: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_schedule_now(&self) -> Result<IndexMap<String, Value>, Error>
pub async fn get_schedule_now(&self) -> Result<IndexMap<String, Value>, Error>
Get current NHL schedule.
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_schedule_now().await;
assert!(result.is_ok());
}Sourcepub async fn get_schedule_date(
&self,
date: &str,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_schedule_date( &self, date: &str, ) -> Result<IndexMap<String, Value>, Error>
Sourcepub async fn get_schedule_calendar(
&self,
) -> Result<IndexMap<String, Value>, Error>
pub async fn get_schedule_calendar( &self, ) -> Result<IndexMap<String, Value>, Error>
Get NHL schedule calendar as of now.
§Example
use nhl_data::Puck;
#[tokio::main]
async fn main() {
let client = Puck::new();
let result = client.get_schedule_calendar().await;
assert!(result.is_ok());
}Auto Trait Implementations§
impl !RefUnwindSafe for Puck
impl !UnwindSafe for Puck
impl Freeze for Puck
impl Send for Puck
impl Sync for Puck
impl Unpin for Puck
impl UnsafeUnpin for Puck
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