Documentation ¶
Index ¶
- type Client
- func (s *Client) GetConferences() ([]Conference, error)
- func (s *Client) GetCurrentSeason() (Season, error)
- func (s *Client) GetDivisions() ([]Division, error)
- func (s *Client) GetPlayerInfo(playerID int) (PlayerInfo, error)
- func (s *Client) GetPositions() ([]Position, error)
- func (s *Client) GetSeasons() ([]Season, error)
- func (s *Client) GetTeams() ([]Team, error)
- type Conference
- type Division
- type ForwardSeasonStat
- type ForwardStat
- type GoalieSeasonStat
- type GoalieStat
- type League
- type PlayerInfo
- type Position
- type Season
- type SeasonStat
- type Team
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
BaseUrl string
}
func (*Client) GetConferences ¶
func (s *Client) GetConferences() ([]Conference, error)
GetConferences return all the nhl conferences
func (*Client) GetCurrentSeason ¶
GetCurrentSeason return the current season
func (*Client) GetDivisions ¶
GetDivisions return all the nhl division
func (*Client) GetPlayerInfo ¶
func (s *Client) GetPlayerInfo(playerID int) (PlayerInfo, error)
GetPlayerInfo return the player info from the given id
func (*Client) GetPositions ¶
GetPositions return all the positions
func (*Client) GetSeasons ¶
GetSeasons return all the seasons
type Conference ¶
type Division ¶
type Division struct { ID int `json:"id"` Name string `json:"name"` NameShort string `json:"nameShort"` Link string `json:"link"` Abbreviation string `json:"abbreviation"` Conference struct { ID int `json:"id"` Name string `json:"name"` Link string `json:"link"` } `json:"conference"` Active bool `json:"active"` }
type ForwardSeasonStat ¶
type ForwardSeasonStat struct { SeasonStat Stat ForwardStat `json:"stat"` }
type ForwardStat ¶
type ForwardStat struct { Assists int `json:"assists"` Goals int `json:"goals"` Pim int `json:"pim"` Games int `json:"games"` PowerPlayGoals int `json:"powerPlayGoals"` PenaltyMinutes string `json:"penaltyMinutes"` ShortHandedGoals int `json:"shortHandedGoals"` PlusMinus int `json:"plusMinus"` Points int `json:"points"` TimeOnIce *string `json:"timeOnIce"` Shots *int `json:"shots"` Hits *int `json:"hits"` PowerPlayPoints *int `json:"powerPlayPoints"` PowerPlayTimeOnIce *string `json:"powerPlayTimeOnIce"` EvenTimeOnIce *string `json:"evenTimeOnIce"` FaceOffPct *float64 `json:"faceOffPct"` ShotPct *float64 `json:"shotPct"` GameWinningGoals *int `json:"gameWinningGoals"` OverTimeGoals *int `json:"overTimeGoals"` ShortHandedPoints *int `json:"shortHandedPoints"` ShortHandedTimeOnIce *string `json:"shortHandedTimeOnIce"` Blocked *int `json:"blocked"` Shifts *int `json:"shifts"` }
ForwardStats is the stats for a forward
type GoalieSeasonStat ¶
type GoalieSeasonStat struct { SeasonStat Stat GoalieStat `json:"stat"` }
type GoalieStat ¶
type GoalieStat struct { TimeOnIce string `json:"timeOnIce"` Shutouts int `json:"shutouts"` Wins int `json:"wins"` Losses int `json:"losses"` Saves int `json:"saves"` SavePercentage float64 `json:"savePercentage"` GoalAgainstAverage float64 `json:"goalAgainstAverage"` Games int `json:"games"` ShotsAgainst int `json:"shotsAgainst"` GoalsAgainst int `json:"goalsAgainst"` Ties *int `json:"ties"` Ot *int `json:"ot"` PowerPlaySaves *int `json:"powerPlaySaves"` ShortHandedSaves *int `json:"shortHandedSaves"` EvenSaves *int `json:"evenSaves"` ShortHandedShots *int `json:"shortHandedShots"` EvenShots *int `json:"evenShots"` PowerPlayShots *int `json:"powerPlayShots"` GamesStarted *int `json:"gamesStarted"` PowerPlaySavePercentage *float64 `json:"powerPlaySavePercentage"` ShortHandedSavePercentage *float64 `json:"shortHandedSavePercentage"` EvenStrengthSavePercentage *float64 `json:"evenStrengthSavePercentage"` }
GoalieStats is the stats for a goalie
type PlayerInfo ¶
type PlayerInfo struct { ID int `json:"id"` FullName string `json:"fullName"` Link string `json:"link"` FirstName string `json:"firstName"` LastName string `json:"lastName"` PrimaryNumber string `json:"primaryNumber"` BirthDate string `json:"birthDate"` BirthStateProvince *string `json:"birthStateProvince"` CurrentAge int `json:"currentAge"` BirthCity string `json:"birthCity"` BirthCountry string `json:"birthCountry"` Nationality string `json:"nationality"` Height string `json:"height"` Weight int `json:"weight"` Active bool `json:"active"` AlternateCaptain bool `json:"alternateCaptain"` Captain bool `json:"captain"` Rookie bool `json:"rookie"` ShootsCatches string `json:"shootsCatches"` RosterStatus string `json:"rosterStatus"` CurrentTeam struct { ID int `json:"id"` Name string `json:"name"` Link string `json:"link"` } `json:"currentTeam"` PrimaryPosition struct { Code string `json:"code"` Name string `json:"name"` Type string `json:"type"` Abbreviation string `json:"abbreviation"` } `json:"primaryPosition"` }
type Season ¶
type Season struct { SeasonID string `json:"seasonId"` RegularSeasonStartDate string `json:"regularSeasonStartDate"` RegularSeasonEndDate string `json:"regularSeasonEndDate"` SeasonEndDate string `json:"seasonEndDate"` NumberOfGames int `json:"numberOfGames"` TiesInUse bool `json:"tiesInUse"` OlympicsParticipation bool `json:"olympicsParticipation"` ConferencesInUse bool `json:"conferencesInUse"` DivisionsInUse bool `json:"divisionsInUse"` WildCardInUse bool `json:"wildCardInUse"` }
type SeasonStat ¶
type Team ¶
type Team struct { ID int `json:"id"` Name string `json:"name"` Link string `json:"link"` Venue struct { Name string `json:"name"` Link string `json:"link"` City string `json:"city"` TimeZone struct { ID string `json:"id"` Offset int `json:"offset"` Tz string `json:"tz"` } `json:"timeZone"` } `json:"venue"` Abbreviation string `json:"abbreviation"` TeamName string `json:"teamName"` LocationName string `json:"locationName"` FirstYearOfPlay string `json:"firstYearOfPlay"` Division struct { ID int `json:"id"` Name string `json:"name"` NameShort string `json:"nameShort"` Link string `json:"link"` Abbreviation string `json:"abbreviation"` } `json:"division"` Conference struct { ID int `json:"id"` Name string `json:"name"` Link string `json:"link"` } `json:"conference"` Franchise struct { FranchiseID int `json:"franchiseId"` TeamName string `json:"teamName"` Link string `json:"link"` } `json:"franchise"` ShortName string `json:"shortName"` OfficialSiteURL string `json:"officialSiteUrl"` FranchiseID int `json:"franchiseId"` Active bool `json:"active"` }
Click to show internal directories.
Click to hide internal directories.