Documentation
¶
Index ¶
- Constants
- type Actual
- type AtBat
- type AtBatPlay
- type AwayTeam
- type BatterUp
- type Batting
- type BoxscoreIO
- type BoxscoreStats
- type Config
- type CurrentContractYear
- type CurrentInjury
- type CurrentSeasonIO
- type CurrentSeasonOptions
- type DailyDfsOptions
- type DailyGamesOptions
- type DailyPlayerGamelogsOptions
- type DailyStandingsOptions
- type DailyTeamGamelogsOptions
- type DfsIO
- type Drafted
- type Expected
- type ExternalMapping
- type Feed
- type FeedUpdate
- type FeedUpdatesIO
- type FeedUpdatesOptions
- type Fielding
- type ForDate
- type ForGame
- type Game
- type GameBoxscoreOptions
- type GameLineupIO
- type GameLineupOptions
- type GameLog
- type GameLogGame
- type GameLogIO
- type GamePlayByPlayIO
- type GamePlayByPlayOptions
- type GameReference
- type GamesIO
- type Handedness
- type HomeTeam
- type HomeVenue
- type IService
- type Inning
- type LineupPosition
- type Miscellaneous
- type OverallContract
- type Pitching
- type Player
- type PlayerInjuriesIO
- type PlayerInjuriesOptions
- type PlayerReference
- type PlayerStatsTotal
- type PlayerStatsTotalsIO
- type Players
- type PlayersIO
- type PlayersOptions
- type Rank
- type References
- type Schedule
- type Score
- type ScoringPlay
- type Season
- type SeasonalDfsOptions
- type SeasonalGamesOptions
- type SeasonalPlayerGamelogsOptions
- type SeasonalPlayerStatsOptions
- type SeasonalTeamGamelogsOptions
- type SeasonalTeamStatsOptions
- type SeasonalVenuesOptions
- type Service
- func (s *Service) CurrentSeason(options *CurrentSeasonOptions) (CurrentSeasonIO, int, error)
- func (s *Service) DailyDfs(options *DailyDfsOptions) (DfsIO, int, error)
- func (s *Service) DailyGames(options *DailyGamesOptions) (GamesIO, int, error)
- func (s *Service) DailyPlayerGamelogs(options *DailyPlayerGamelogsOptions) (GameLogIO, int, error)
- func (s *Service) DailyStandings(options *DailyStandingsOptions) (StandingsIO, int, error)
- func (s *Service) DailyTeamGamelogs(options *DailyTeamGamelogsOptions) (GameLogIO, int, error)
- func (s *Service) FeedUpdates(options *FeedUpdatesOptions) (FeedUpdatesIO, int, error)
- func (s *Service) GameBoxscore(options *GameBoxscoreOptions) (BoxscoreIO, int, error)
- func (s *Service) GameLineup(options *GameLineupOptions) (GameLineupIO, int, error)
- func (s *Service) GamePlayByPlay(options *GamePlayByPlayOptions) (GamePlayByPlayIO, int, error)
- func (s *Service) NewCurrentSeasonOptions() *CurrentSeasonOptions
- func (s *Service) NewDailyDfsOptions() *DailyDfsOptions
- func (s *Service) NewDailyGamesOptions() *DailyGamesOptions
- func (s *Service) NewDailyPlayerGamelogsOptions() *DailyPlayerGamelogsOptions
- func (s *Service) NewDailyStandingsOptions() *DailyStandingsOptions
- func (s *Service) NewDailyTeamGamelogsOptions() *DailyTeamGamelogsOptions
- func (s *Service) NewFeedUpdatesOptions() *FeedUpdatesOptions
- func (s *Service) NewGameBoxscoreOptions() *GameBoxscoreOptions
- func (s *Service) NewGameLineupOptions() *GameLineupOptions
- func (s *Service) NewGamePlayByPlayOptions() *GamePlayByPlayOptions
- func (s *Service) NewPlayerInjuriesOptions() *PlayerInjuriesOptions
- func (s *Service) NewPlayersOptions() *PlayersOptions
- func (s *Service) NewSeasonalDfsOptions() *SeasonalDfsOptions
- func (s *Service) NewSeasonalGamesOptions() *SeasonalGamesOptions
- func (s *Service) NewSeasonalPlayerGamelogsOptions() *SeasonalPlayerGamelogsOptions
- func (s *Service) NewSeasonalPlayerStatsOptions() *SeasonalPlayerStatsOptions
- func (s *Service) NewSeasonalTeamGamelogsOptions() *SeasonalTeamGamelogsOptions
- func (s *Service) NewSeasonalTeamStatsOptions() *SeasonalTeamStatsOptions
- func (s *Service) NewSeasonalVenuesOptions() *SeasonalVenuesOptions
- func (s *Service) PlayerInjuries(options *PlayerInjuriesOptions) (PlayerInjuriesIO, int, error)
- func (s *Service) Players(options *PlayersOptions) (PlayersIO, int, error)
- func (s *Service) SeasonalDfs(options *SeasonalDfsOptions) (DfsIO, int, error)
- func (s *Service) SeasonalGames(options *SeasonalGamesOptions) (GamesIO, int, error)
- func (s *Service) SeasonalPlayerGamelogs(options *SeasonalPlayerGamelogsOptions) (GameLogIO, int, error)
- func (s *Service) SeasonalPlayerStats(options *SeasonalPlayerStatsOptions) (PlayerStatsTotalsIO, int, error)
- func (s *Service) SeasonalTeamGamelogs(options *SeasonalTeamGamelogsOptions) (GameLogIO, int, error)
- func (s *Service) SeasonalTeamStats(options *SeasonalTeamStatsOptions) (TeamStatsTotalsIO, int, error)
- func (s *Service) SeasonalVenues(options *SeasonalVenuesOptions) (VenuesIO, int, error)
- type SigningTeam
- type Standings
- type StandingsIO
- type StatReference
- type Stats
- type StatsHomeAway
- type Team
- type TeamLineup
- type TeamReference
- type TeamStatsTotal
- type TeamStatsTotalsIO
- type Teams
- type Venue
- type VenueReference
- type Venues
- type VenuesIO
Constants ¶
const ( // VersionV1_1 - v1.1 VersionV1_1 = "v1.1" // VersionV1_2 - v1.2 VersionV1_2 = "v1.2" // VersionV2_0 - v2.0 VersionV2_0 = "v2.0" // VersionV2_1 - v2.1 VersionV2_1 = "v2.1" )
VERSION
const ( // SportMLB - baseball SportMLB = "mlb" // SportNFL - football SportNFL = "nfl" // SportNBA - Basketball SportNBA = "nba" // SportNHL - Hockey SportNHL = "nhl" )
SPORT
const ( // FormatJSON - returns the format in json FormatJSON = "json" // FormatXML - returns the format in xml FormatXML = "xml" // FormatCSV - returns the format in csv FormatCSV = "csv" )
RETURN FORMAT
const ( // SeasonCurrent - current season SeasonCurrent = "current" // SeasonLatest - latest season SeasonLatest = "latest" // SeasonUpcoming - upcoming season SeasonUpcoming = "upcoming" )
SEASON
const ( // DateYesterday - DateYesterday = "yesterday" // DateToday - DateToday = "today" // DateTomorrow - DateTomorrow = "tomorrow" // Date2019Season - Date2019Season = "2019-regular" )
DATE
const ( // StatusUnplayed - returns games scheduled but not yet started StatusUnplayed = "unplayed" // StatusInProgress - returns games currently underway StatusInProgress = "in-progress" // StatusPostgameReviewing - returns game is over, but we're reviewing against official sources StatusPostgameReviewing = "postgame-reviewing" // StatusFinal - returns game is final and reviewed StatusFinal = "final" )
STATUS
const (
// CompressionHeaderGzip - type of compression header
CompressionHeaderGzip = "gzip"
)
const (
// URL - api url
MySportsFeedBaseURL = "https://api.mysportsfeeds.com"
)
ADDRESS
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actual ¶
type Actual struct {
LineupPositions *[]LineupPosition `json:"lineupPositions"`
}
type AtBatPlay ¶
type AtBatPlay struct {
BatterUp *BatterUp `json:"batterUp"`
// TODO: fill these out
// Pitch *Pitch `json:"pitch"`
// PickoffAttempt *PickoffAttempt `json:"pickoffAttempt"`
// Hit *Hit `json:"hit"`
// BaseRunAttempt *BaseRunAttempt `json:"baseRunAttempt"`
// BallThrow *BallThrow `json:"ballThrow"`
Description *string `json:"description"`
}
type Batting ¶
type Batting struct {
AtBats *int `json:"atBats"`
Runs *int `json:"runs"`
Hits *int `json:"hits"`
SecondBaseHits *int `json:"secondBaseHits"`
ThirdBaseHits *int `json:"thirdBaseHits"`
Homeruns *int `json:"homeruns"`
EarnedRuns *int `json:"earnedRuns"`
UnearnedRuns *int `json:"unearnedRuns"`
RunsBattedIn *int `json:"runsBattedIn"`
BatterWalks *int `json:"batterWalks"`
BatterSwings *int `json:"batterSwings"`
BatterStrikes *int `json:"batterStrikes"`
BatterStrikesFoul *int `json:"batterStrikesFoul"`
BatterStrikesMiss *int `json:"batterStrikesMiss"`
BatterStrikesLooking *int `json:"batterStrikesLooking"`
BatterTagOuts *int `json:"batterTagOuts"`
BatterForceOuts *int `json:"batterForceOuts"`
BatterPutOuts *int `json:"batterPutOuts"`
BatterGroundBalls *int `json:"batterGroundBalls"`
BatterFlyBalls *int `json:"batterFlyBalls"`
BatterLineDrives *int `json:"batterLineDrives"`
Batter2SeamFastballs *int `json:"batter2SeamFastballs"`
Batter4SeamFastballs *int `json:"batter4SeamFastballs"`
BatterCurveballs *int `json:"batterCurveballs"`
BatterChangeups *int `json:"batterChangeups"`
BatterCutters *int `json:"batterCutters"`
BatterSliders *int `json:"batterSliders"`
BatterSinkers *int `json:"batterSinkers"`
BatterSplitters *int `json:"batterSplitters"`
BatterStrikeouts *int `json:"batterStrikeouts"`
StolenBases *int `json:"stolenBases"`
CaughtBaseSteals *int `json:"caughtBaseSteals"`
BatterStolenBasePct *float64 `json:"batterStolenBasePct"`
BattingAvg *float64 `json:"battingAvg"`
BatterOnBasePct *float64 `json:"batterOnBasePct"`
BatterSluggingPct *float64 `json:"batterSluggingPct"`
BatterOnBasePlusSluggingPct *float64 `json:"batterOnBasePlusSluggingPct"`
BatterIntentionalWalks *int `json:"batterIntentionalWalks"`
HitByPitch *int `json:"hitByPitch"`
BatterSacrificeBunts *int `json:"batterSacrificeBunts"`
BatterSacrificeFlies *int `json:"batterSacrificeFlies"`
TotalBases *int `json:"totalBases"`
ExtraBaseHits *int `json:"extraBaseHits"`
BatterDoublePlays *int `json:"batterDoublePlays"`
BatterTriplePlays *int `json:"batterTriplePlays"`
BatterGroundOuts *int `json:"batterGroundOuts"`
BatterFlyOuts *int `json:"batterFlyOuts"`
BatterGroundOutToFlyOutRatio *float64 `json:"batterGroundOutToFlyOutRatio"`
PitchesFaced *int `json:"pitchesFaced"`
PlateAppearances *int `json:"plateAppearances"`
LeftOnBase *int `json:"leftOnBase"`
}
type BoxscoreIO ¶
type BoxscoreIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
Game *Schedule `json:"game"`
Scoring *Score `json:"scoring"`
Stats *StatsHomeAway `json:"stats"`
References *References `json:"references"`
}
type BoxscoreStats ¶
type Config ¶
type Config struct {
// Authorization - your basic authentication
// Required to hit any mysportsfeeds api endpoints
Authorization string
// BaseURL - the base url for my sports feeds api
// Defaults to "https://api.mysportsfeeds.com"
BaseURL string
// Version - what version of the mysportsfeeds api you want to hit.
// Defaults to "2.0"
Version string
// Sport - what sport you want data back from
// Defaults to "mlb"
Sport string
// Format - what format you want to receive back from the api
// Defaults to "json"
Format string
// Season - what season you want to access from the api
// Defaults to "current"
Season string
}
Config - holds your authorization
type CurrentContractYear ¶
type CurrentContractYear struct {
SeasonStartYear int `json:"seasonStartYear"`
BaseSalary int `json:"baseSalary"`
MinorsSalary int `json:"minorsSalary"`
SigningBonus int `json:"signingBonus"`
OtherBonuses int `json:"otherBonuses"`
CapHit interface{} `json:"capHit"`
FullNoTradeClause bool `json:"fullNoTradeClause"`
ModifiedNoTradeClause bool `json:"modifiedNoTradeClause"`
NoMovementClause bool `json:"noMovementClause"`
OverallContract *OverallContract `json:"overallContract"`
}
type CurrentInjury ¶
type CurrentSeasonIO ¶
type CurrentSeasonOptions ¶
type CurrentSeasonOptions struct {
// URL Parts
URL string
Version string
Sport string
Format string
// Optional URL Params
Date string
Force string
}
CurrentSeasonOptions - Are the options to hit the current season endpoint
type DailyDfsOptions ¶
type DailyDfsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Date string
Format string
// Optional URL Params
Team string
Player string
Position string
Country string
DfsType string
Sort string
Offset string
Limit string
Force string
}
DailyDfsOptions - Are the options to hit the daily DFS endpoint
type DailyGamesOptions ¶
type DailyGamesOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Date string //YYYYMMDD
Format string
// Optional URL Params
Team string
Status string
Sort string
Offset string
Limit string
Force string
}
DailyGamesOptions - Are the options to hit the daily games endpoint
type DailyPlayerGamelogsOptions ¶
type DailyPlayerGamelogsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Date string // YYYYMMDD
Week string // 1-40
Format string
// Optional URL Params
Team string
Player string
Position string
Game string
Stats string
Sort string
Offset string
Limit string
Force string
}
DailyPlayerGamelogsOptions - Are the options to hit the daily player gamelogs endpoint
type DailyStandingsOptions ¶
type DailyStandingsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Date string
Team string
Stats string
Force string
}
DailyStandingsOptions - Are the options to hit the daily standings endpoint
type DailyTeamGamelogsOptions ¶
type DailyTeamGamelogsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Date string // YYYYMMDD
Format string
// Optional URL Params
Team string
Game string
Stats string
Sort string
Offset string
Limit string
Force string
}
DailyTeamGamelogsOptions - Are the options to hit the daily team gamelogs endpoint
type DfsIO ¶
type DfsIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
References *References `json:"references"`
}
type Expected ¶
type Expected struct {
LineupPositions *[]LineupPosition `json:"lineupPositions"`
}
type ExternalMapping ¶
type ExternalMapping struct {
Source *string `json:"source"`
ID interface{} `json:"id"`
}
type FeedUpdate ¶
type FeedUpdatesIO ¶
type FeedUpdatesIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
FeedUpdates *[]FeedUpdate `json:"feedUpdates"`
}
type FeedUpdatesOptions ¶
type FeedUpdatesOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Force string
}
FeedUpdatesOptions - Are the options to hit the feed updates endpoint
type Fielding ¶
type Fielding struct {
InningsPlayed *float64 `json:"inningsPlayed"`
TotalChances *int `json:"totalChances"`
FielderTagOuts *int `json:"fielderTagOuts"`
FielderForceOuts *int `json:"fielderForceOuts"`
FielderPutOuts *int `json:"fielderPutOuts"`
OutsFaced *int `json:"outsFaced"`
Assists *int `json:"assists"`
Errors *int `json:"errors"`
FielderDoublePlays *int `json:"fielderDoublePlays"`
FielderTriplePlays *int `json:"fielderTriplePlays"`
FielderStolenBasesAllowed *int `json:"fielderStolenBasesAllowed"`
FielderCaughtStealing *int `json:"fielderCaughtStealing"`
FielderStolenBasePct *float64 `json:"fielderStolenBasePct"`
PassedBalls *int `json:"passedBalls"`
FielderWildPitches *int `json:"fielderWildPitches"`
FieldingPct *float64 `json:"fieldingPct"`
DefenceEfficiencyRatio *float64 `json:"defenceEfficiencyRatio"`
RangeFactor *float64 `json:"rangeFactor"`
}
type GameBoxscoreOptions ¶
type GameBoxscoreOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Game string
Format string
// Optional URL Params
TeamStats string
PlayerStats string
Sort string
Offset string
Limit string
Force string
}
GameBoxscoreOptions - Are the options to hit the game boxscore endpoint
type GameLineupIO ¶
type GameLineupIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
Game *Schedule `json:"game"`
TeamLineups *[]TeamLineup `json:"teamLineups"`
References *References `json:"references"`
}
type GameLineupOptions ¶
type GameLineupOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Game string
Format string
// Optional URL Params
Position string
LineupType string
Force string
}
GameLineupOptions - Are the options to hit the game lineup endpoint
type GameLog ¶
type GameLog struct {
Game *GameLogGame `json:"game"`
Player *Player `json:"player"`
Team *Team `json:"team"`
Stats *Stats `json:"stats"`
}
type GameLogGame ¶
type GameLogIO ¶
type GameLogIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
GameLog *[]GameLog `json:"gamelogs"`
References *References `json:"references"`
}
type GamePlayByPlayIO ¶
type GamePlayByPlayIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
Game *Schedule `json:"game"`
AtBats *[]AtBat `json:"atBats"`
References *References `json:"references"`
}
type GamePlayByPlayOptions ¶
type GamePlayByPlayOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Game string
Format string
// Optional URL Params
Playtype string
Sort string
Offset string
Limit string
Force string
}
GamePlayByPlayOptions - Are the options to hit the seasonal DFS endpoint
type GameReference ¶
type GameReference struct {
ID int `json:"id"`
StartTime string `json:"startTime"`
AwayTeam AwayTeam `json:"awayTeam"`
HomeTeam HomeTeam `json:"homeTeam"`
Venue Venue `json:"venue"`
VenueAllegiance string `json:"venueAllegiance"`
ScheduleStatus string `json:"scheduleStatus"`
OriginalStartTime *string `json:"originalStartTime"`
DelayedOrPostponedReason *string `json:"delayedOrPostponedReason"`
PlayedStatus *string `json:"playedStatus"`
}
type GamesIO ¶
type GamesIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
Games *[]Game `json:"games"`
References *References `json:"references"`
}
Main Models
type Handedness ¶
type IService ¶
type IService interface {
NewCurrentSeasonOptions() *CurrentSeasonOptions
CurrentSeason(options *CurrentSeasonOptions) (CurrentSeasonIO, int, error)
NewDailyDfsOptions() *DailyDfsOptions
DailyDfs(options *DailyDfsOptions) (DfsIO, int, error)
NewDailyGamesOptions() *DailyGamesOptions
DailyGames(options *DailyGamesOptions) (GamesIO, int, error)
NewDailyPlayerGamelogsOptions() *DailyPlayerGamelogsOptions
DailyPlayerGamelogs(options *DailyPlayerGamelogsOptions) (GameLogIO, int, error)
NewDailyStandingsOptions() *DailyStandingsOptions
DailyStandings(options *DailyStandingsOptions) (StandingsIO, int, error)
NewDailyTeamGamelogsOptions() *DailyTeamGamelogsOptions
DailyTeamGamelogs(options *DailyTeamGamelogsOptions) (GameLogIO, int, error)
NewFeedUpdatesOptions() *FeedUpdatesOptions
FeedUpdates(options *FeedUpdatesOptions) (FeedUpdatesIO, int, error)
NewGameBoxscoreOptions() *GameBoxscoreOptions
GameBoxscore(options *GameBoxscoreOptions) (BoxscoreIO, int, error)
NewGameLineupOptions() *GameLineupOptions
GameLineup(options *GameLineupOptions) (GameLineupIO, int, error)
NewGamePlayByPlayOptions() *GamePlayByPlayOptions
GamePlayByPlay(options *GamePlayByPlayOptions) (GamePlayByPlayIO, int, error)
NewPlayerInjuriesOptions() *PlayerInjuriesOptions
PlayerInjuries(options *PlayerInjuriesOptions) (PlayerInjuriesIO, int, error)
NewPlayersOptions() *PlayersOptions
Players(options *PlayersOptions) (PlayersIO, int, error)
NewSeasonalDfsOptions() *SeasonalDfsOptions
SeasonalDfs(options *SeasonalDfsOptions) (DfsIO, int, error)
NewSeasonalGamesOptions() *SeasonalGamesOptions
SeasonalGames(options *SeasonalGamesOptions) (GamesIO, int, error)
NewSeasonalPlayerGamelogsOptions() *SeasonalPlayerGamelogsOptions
SeasonalPlayerGamelogs(options *SeasonalPlayerGamelogsOptions) (GameLogIO, int, error)
NewSeasonalPlayerStatsOptions() *SeasonalPlayerStatsOptions
SeasonalPlayerStats(options *SeasonalPlayerStatsOptions) (PlayerStatsTotalsIO, int, error)
NewSeasonalTeamGamelogsOptions() *SeasonalTeamGamelogsOptions
SeasonalTeamGamelogs(options *SeasonalTeamGamelogsOptions) (GameLogIO, int, error)
NewSeasonalTeamStatsOptions() *SeasonalTeamStatsOptions
SeasonalTeamStats(options *SeasonalTeamStatsOptions) (TeamStatsTotalsIO, int, error)
NewSeasonalVenuesOptions() *SeasonalVenuesOptions
SeasonalVenues(options *SeasonalVenuesOptions) (VenuesIO, int, error)
}
IService - all functions that implement the My Sports Feed Service Interface.
type Inning ¶
type Inning struct {
InningNumber *int `json:"inningNumber"`
AwayScore *int `json:"awayScore"`
HomeScore *int `json:"homeScore"`
ScoringPlays *[]ScoringPlay `json:"scoringPlays"`
}
type LineupPosition ¶
type Miscellaneous ¶
type Miscellaneous struct {
GamesStarted *int `json:"gamesStarted"`
}
type OverallContract ¶
type OverallContract struct {
SigningTeam *SigningTeam `json:"signingTeam"`
SignedOn interface{} `json:"signedOn"`
TotalYears int `json:"totalYears"`
TotalSalary int `json:"totalSalary"`
TotalBonuses int `json:"totalBonuses"`
ExpiryStatus interface{} `json:"expiryStatus"`
AnnualAverageSalary int `json:"annualAverageSalary"`
}
type Pitching ¶
type Pitching struct {
Wins *int `json:"wins"`
Losses *int `json:"losses"`
EarnedRunAvg *float64 `json:"earnedRunAvg"`
Saves *int `json:"saves"`
SaveOpportunities *int `json:"SaveOpportunities"`
InningsPitched *float64 `json:"inningsPitched"`
HitsAllowed *int `json:"hitsAllowed"`
SecondBaseHitsAllowed *int `json:"secondBaseHitsAllowed"`
ThirdBaseHitsAllowed *int `json:"thirdBaseHitsAllowed"`
RunsAllowed *int `json:"runsAllowed"`
EarnedRunsAllowed *int `json:"earnedRunsAllowed"`
HomerunsAllowed *int `json:"homerunsAllowed"`
PitcherWalks *int `json:"pitcherWalks"`
PitcherSwings *int `json:"pitcherSwings"`
PitcherStrikes *int `json:"pitcherStrikes"`
PitcherStrikesFoul *int `json:"pitcherStrikesFoul"`
PitcherStrikesMiss *int `json:"pitcherStrikesMiss"`
PitcherStrikesLooking *int `json:"pitcherStrikesLooking"`
PitcherGroundBalls *int `json:"pitcherGroundBalls"`
PitcherFlyBalls *int `json:"pitcherFlyBalls"`
PitcherLineDrives *int `json:"pitcherLineDrives"`
Pitcher2SeamFastballs *int `json:"pitcher2SeamFastballs"`
Pitcher4SeamFastballs *int `json:"pitcher4SeamFastballs"`
PitcherCurveballs *int `json:"pitcherCurveballs"`
PitcherChangeups *int `json:"pitcherChangeups"`
PitcherCutters *int `json:"pitcherCutters"`
PitcherSliders *int `json:"pitcherSliders"`
PitcherSinkers *int `json:"pitcherSinkers"`
PitcherSplitters *int `json:"pitcherSplitters"`
PitcherSacrificeBunts *int `json:"pitcherSacrificeBunts"`
PitcherSacrificeFlies *int `json:"pitcherSacrificeFlies"`
PitcherStrikeouts *int `json:"pitcherStrikeouts"`
PitchingAvg *float64 `json:"pitchingAvg"`
WalksAndHitsPerInningPitched *float64 `json:"walksAndHitsPerInningPitched"`
CompletedGames *int `json:"completedGames"`
Shutouts *int `json:"shutouts"`
BattersHit *int `json:"battersHit"`
PitcherIntentionalWalks *int `json:"pitcherIntentionalWalks"`
GamesFinished *int `json:"gamesFinished"`
Holds *int `json:"holds"`
PitcherDoublePlays *int `json:"pitcherDoublePlays"`
PitcherTriplePlays *int `json:"pitcherTriplePlays"`
PitcherGroundOuts *int `json:"pitcherGroundOuts"`
PitcherFlyOuts *int `json:"pitcherFlyOuts"`
PitcherWildPitches *int `json:"pitcherWildPitches"`
Balks *int `json:"balks"`
PitcherStolenBasesAllowed *int `json:"pitcherStolenBasesAllowed"`
PitcherCaughtStealing *int `json:"pitcherCaughtStealing"`
Pickoffs *int `json:"pickoffs"`
PickoffAttempts *int `json:"pickoffAttempts"`
TotalBattersFaced *int `json:"totalBattersFaced"`
PitchesThrown *int `json:"pitchesThrown"`
WinPct *float64 `json:"winPct"`
PitcherGroundOutToFlyOutRatio *float64 `json:"pitcherGroundOutToFlyOutRatio"`
PitcherOnBasePct *float64 `json:"pitcherOnBasePct"`
PitcherSluggingPct *float64 `json:"pitcherSluggingPct"`
PitcherOnBasePlusSluggingPct *float64 `json:"pitcherOnBasePlusSluggingPct"`
StrikeoutsPer9Innings *float64 `json:"strikeoutsPer9Innings"`
WalksAllowedPer9Innings *float64 `json:"walksAllowedPer9Innings"`
HitsAllowedPer9Innings *float64 `json:"hitsAllowedPer9Innings"`
StrikeoutsToWalksRatio *float64 `json:"strikeoutsToWalksRatio"`
PitchesPerInning *float64 `json:"pitchesPerInning"`
PitcherAtBats *int `json:"pitcherAtBats"`
}
type Player ¶
type Player struct {
ID int `json:"id"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
PrimaryPosition string `json:"primaryPosition"`
AlternatePositions interface{} `json:"alternatePositions"`
JerseyNumber *int `json:"jerseyNumber"`
CurrentTeam *Team `json:"currentTeam"`
CurrentRosterStatus *string `json:"currentRosterStatus"`
CurrentInjury *CurrentInjury `json:"currentInjury"`
Height *string `json:"height"`
Weight *string `json:"weight"`
Age *int `json:"age"`
Rookie *bool `json:"rookie"`
Handedness interface{} `json:"handedness"`
OfficialImageSrc *string `json:"officialImageSrc"`
SocialMediaAccounts interface{} `json:"socialMediaAccounts"`
CurrentContractYear *CurrentContractYear `json:"currentContractYear"`
Drafted Drafted `json:"drafted"`
ExternalMappings []ExternalMapping `json:"externalMappings"`
}
type PlayerInjuriesIO ¶
type PlayerInjuriesIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
Players *[]PlayerReference `json:"players"`
}
type PlayerInjuriesOptions ¶
type PlayerInjuriesOptions struct {
// URL Parts
URL string
Version string
Sport string
Format string
// Optional URL Params
Player string
Team string
Position string
Sort string
Offset string
Limit string
Force string
}
PlayerInjuriesOptions - Are the options to hit the player injuries endpoint
type PlayerReference ¶
type PlayerReference struct {
Player
Height *string `json:"height"`
Weight *float64 `json:"weight"`
BirthDate *string `json:"birthDate"`
Age *int `json:"age"`
BirthCity *string `json:"birthCity"`
BirthCountry *string `json:"birthCountry"`
Rookie *bool `json:"rookie"`
College *string `json:"college"`
Twitter *string `json:"twitter"`
Handedness *Handedness `json:"handedness"`
Drafted *Drafted `json:"drafted"`
OfficialImageSrc *string `json:"officialImageSrc"`
ExternalMapping *ExternalMapping `json:"externalMapping"`
}
type PlayerStatsTotal ¶
type PlayerStatsTotal struct {
Player *PlayerReference `json:"player"`
Team *Team `json:"team"`
Stats *Stats `json:"stats"`
}
type PlayerStatsTotalsIO ¶
type PlayerStatsTotalsIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
PlayerStatsTotals *[]PlayerStatsTotal `json:"playerStatsTotals"`
References *References `json:"references"`
}
type Players ¶
type Players struct {
Player *PlayerReference `json:"player"`
TeamAsOfDate *Team `json:"teamAsOfDate"`
PlayerStats *[]Stats `json:"playerStats"`
}
type PlayersIO ¶
type PlayersIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
Players *[]Players `json:"players"`
References *References `json:"references"`
}
type PlayersOptions ¶
type PlayersOptions struct {
// URL Parts
URL string
Version string
Sport string
Format string
// Optional URL Params
Date string
Team string
RosterStatus string
Player string
Position string
Country string
Sort string
Offset string
Limit string
Force string
}
PlayersOptions - Are the options to hit the players endpoint
type References ¶
type References struct {
TeamReferences *[]TeamReference `json:"teamReferences"`
TeamStatReferences *[]StatReference `json:"teamStatReferences"`
VenueReferences *[]VenueReference `json:"venueReferences"`
GameReferences *[]GameReference `json:"gameReferences"`
PlayerReferences *[]PlayerReference `json:"playerReferences"`
PlayerStatReferences *[]StatReference `json:"playerStatReferences"`
}
type Schedule ¶
type Schedule struct {
ID int `json:"id"`
StartTime string `json:"startTime"`
AwayTeam AwayTeam `json:"awayTeam"`
HomeTeam HomeTeam `json:"homeTeam"`
Venue Venue `json:"venue"`
VenueAllegiance string `json:"venueAllegiance"`
ScheduleStatus string `json:"scheduleStatus"`
OriginalStartTime *string `json:"originalStartTime"`
DelayedOrPostponedReason *string `json:"delayedOrPostponedReason"`
PlayedStatus string `json:"playedStatus"`
}
type Score ¶
type Score struct {
CurrentInning *int `json:"currentInning"`
CurrentInningHalf *string `json:"currentInningHalf"`
CurrentIntermission *int `json:"currentIntermission"`
AwayScoreTotal *int `json:"awayScoreTotal"`
AwayHitsTotal *int `json:"awayHitsTotal"`
AwayErrorsTotal *int `json:"awayErrorsTotal"`
HomeScoreTotal *int `json:"homeScoreTotal"`
HomeHitsTotal *int `json:"homeHitsTotal"`
HomeErrorsTotal *int `json:"homeErrorsTotal"`
Innings []*Inning `json:"innings"`
}
type ScoringPlay ¶
type Season ¶
type Season struct {
Name *string `json:"name"`
Slug *string `json:"slug"`
StartDate *string `json:"startDate"`
EndDate *string `json:"endDate"`
SeasonInterval *string `json:"seasonInterval"`
SupportedTeamStats *[]StatReference `json:"supportedTeamStats"`
SupportedPlayerStats *[]StatReference `json:"supportedPlayerStats"`
}
type SeasonalDfsOptions ¶
type SeasonalDfsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Team string
Player string
Position string
Country string
DfsType string
Sort string
Offset string
Limit string
Force string
}
SeasonalDfsOptions - Are the options to hit the seasonal DFS endpoint
type SeasonalGamesOptions ¶
type SeasonalGamesOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Team string
Date string
Status string
Sort string
Offset string
Limit string
Force string
}
SeasonalGamesOptions - Are the options to hit the seasonal games endpoint
type SeasonalPlayerGamelogsOptions ¶
type SeasonalPlayerGamelogsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Team string
Player string
Position string
Game string
Date string
Stats string
Sort string
Offset string
Limit string
Force string
}
SeasonalPlayerGamelogsOptions - Are the options to hit the seasonal games endpoint
type SeasonalPlayerStatsOptions ¶
type SeasonalPlayerStatsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Player string
Position string
Country string
Team string
Date string
Stats string
Sort string
Offset string
Limit string
Force string
}
SeasonalPlayerStatsOptions - Are the options to hit the seasonal player stats endpoint
type SeasonalTeamGamelogsOptions ¶
type SeasonalTeamGamelogsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Team string
Game string
Date string
Stats string
Sort string
Offset string
Limit string
Force string
}
SeasonalTeamGamelogsOptions - Are the options to hit the seasonal team gamelogs endpoint
type SeasonalTeamStatsOptions ¶
type SeasonalTeamStatsOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Team string
Date string
Stats string
Sort string
Offset string
Limit string
Force string
}
SeasonalTeamStatsOptions - Are the options to hit the seasonal team stats endpoint
type SeasonalVenuesOptions ¶
type SeasonalVenuesOptions struct {
// URL Parts
URL string
Version string
Sport string
Season string
Format string
// Optional URL Params
Team string
Force string
}
SeasonalVenuesOptions - Are the options to hit the seasonal venues endpoint
type Service ¶
Service - dependencies for the my sports feed service
func (*Service) CurrentSeason ¶
func (s *Service) CurrentSeason(options *CurrentSeasonOptions) (CurrentSeasonIO, int, error)
CurrentSeason - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/current_season.{format} endpoint
func (*Service) DailyDfs ¶
func (s *Service) DailyDfs(options *DailyDfsOptions) (DfsIO, int, error)
DailyDfs - hits the https://api.mysportsfeeds.com/{version/pull/{sport}/{season}/date/{date}/dfs.{format} endpoint
func (*Service) DailyGames ¶
func (s *Service) DailyGames(options *DailyGamesOptions) (GamesIO, int, error)
DailyGames - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/date/{date}/games.{format} endoint
func (*Service) DailyPlayerGamelogs ¶
func (s *Service) DailyPlayerGamelogs(options *DailyPlayerGamelogsOptions) (GameLogIO, int, error)
DailyPlayerGamelogs - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/date/{date}/week/{week}/player_gamelogs.{format} endoint
func (*Service) DailyStandings ¶
func (s *Service) DailyStandings(options *DailyStandingsOptions) (StandingsIO, int, error)
DailyStandings - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/standings.{format} endoint
func (*Service) DailyTeamGamelogs ¶
func (s *Service) DailyTeamGamelogs(options *DailyTeamGamelogsOptions) (GameLogIO, int, error)
DailyTeamGamelogs - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/date/{date}/team_gamelogs.{format} endoint
func (*Service) FeedUpdates ¶
func (s *Service) FeedUpdates(options *FeedUpdatesOptions) (FeedUpdatesIO, int, error)
FeedUpdates - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/latest_updates.{format} endpoint
func (*Service) GameBoxscore ¶
func (s *Service) GameBoxscore(options *GameBoxscoreOptions) (BoxscoreIO, int, error)
GameBoxscore - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/games/{game}/boxscore.{format} endoint
func (*Service) GameLineup ¶
func (s *Service) GameLineup(options *GameLineupOptions) (GameLineupIO, int, error)
GameLineup - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/games/{game}/lineup.{format} endoint
func (*Service) GamePlayByPlay ¶
func (s *Service) GamePlayByPlay(options *GamePlayByPlayOptions) (GamePlayByPlayIO, int, error)
GamePlayByPlay - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/games/{game}/playbyplay.{format} endoint
func (*Service) NewCurrentSeasonOptions ¶
func (s *Service) NewCurrentSeasonOptions() *CurrentSeasonOptions
NewCurrentSeasonOptions - Returns the options with most url parts already set to hit the current season endpoint
func (*Service) NewDailyDfsOptions ¶
func (s *Service) NewDailyDfsOptions() *DailyDfsOptions
NewDailyDfsOptions - Returns the options with most url parts already set to hit the daily DFS endpoint
func (*Service) NewDailyGamesOptions ¶
func (s *Service) NewDailyGamesOptions() *DailyGamesOptions
NewDailyGamesOptions - Returns the options with most url parts already set to hit the daily games endpoint
func (*Service) NewDailyPlayerGamelogsOptions ¶
func (s *Service) NewDailyPlayerGamelogsOptions() *DailyPlayerGamelogsOptions
NewDailyPlayerGamelogsOptions - Returns the options with most url parts already set to hit the seasonal games endpoint
func (*Service) NewDailyStandingsOptions ¶
func (s *Service) NewDailyStandingsOptions() *DailyStandingsOptions
NewDailyStandingsOptions - Returns the options with most url parts already set to hit the daily standings endpoint
func (*Service) NewDailyTeamGamelogsOptions ¶
func (s *Service) NewDailyTeamGamelogsOptions() *DailyTeamGamelogsOptions
NewDailyTeamGamelogsOptions - Returns the options with most url parts already set to hit the seasonal games endpoint
func (*Service) NewFeedUpdatesOptions ¶
func (s *Service) NewFeedUpdatesOptions() *FeedUpdatesOptions
NewFeedUpdatesOptions - Returns the options with most url parts already set to hit the feed updates endpoint
func (*Service) NewGameBoxscoreOptions ¶
func (s *Service) NewGameBoxscoreOptions() *GameBoxscoreOptions
NewGameBoxscoreOptions - Returns the options with most url parts already set to hit the daily games endpoint
func (*Service) NewGameLineupOptions ¶
func (s *Service) NewGameLineupOptions() *GameLineupOptions
NewGameLineupOptions - Returns the options with most url parts already set to hit the game lineup endpoint
func (*Service) NewGamePlayByPlayOptions ¶
func (s *Service) NewGamePlayByPlayOptions() *GamePlayByPlayOptions
NewGamePlayByPlayOptions - Returns the options with most url parts already set to hit the game lineup endpoint
func (*Service) NewPlayerInjuriesOptions ¶
func (s *Service) NewPlayerInjuriesOptions() *PlayerInjuriesOptions
NewPlayerInjuriesOptions - Returns the options with most url parts already set to hit the player injuries endpoint
func (*Service) NewPlayersOptions ¶
func (s *Service) NewPlayersOptions() *PlayersOptions
NewPlayersOptions - Returns the options with most url parts already set to hit the players endpoint
func (*Service) NewSeasonalDfsOptions ¶
func (s *Service) NewSeasonalDfsOptions() *SeasonalDfsOptions
NewSeasonalDfsOptions - Returns the options with most url parts already set to hit the seasonal DFS endpoint
func (*Service) NewSeasonalGamesOptions ¶
func (s *Service) NewSeasonalGamesOptions() *SeasonalGamesOptions
NewSeasonalGamesOptions - Returns the options with most url parts already set to hit the seasonal games endpoint
func (*Service) NewSeasonalPlayerGamelogsOptions ¶
func (s *Service) NewSeasonalPlayerGamelogsOptions() *SeasonalPlayerGamelogsOptions
NewSeasonalPlayerGamelogsOptions - Returns the options with most url parts already set to hit the seasonal games endpoint
func (*Service) NewSeasonalPlayerStatsOptions ¶
func (s *Service) NewSeasonalPlayerStatsOptions() *SeasonalPlayerStatsOptions
NewSeasonalPlayerStatsOptions - Returns the options with most url parts already set to hit the seasonal player stats endpoint
func (*Service) NewSeasonalTeamGamelogsOptions ¶
func (s *Service) NewSeasonalTeamGamelogsOptions() *SeasonalTeamGamelogsOptions
NewSeasonalTeamGamelogsOptions - Returns the options with most url parts already set to hit the seasonal games endpoint
func (*Service) NewSeasonalTeamStatsOptions ¶
func (s *Service) NewSeasonalTeamStatsOptions() *SeasonalTeamStatsOptions
NewSeasonalTeamStatsOptions - Returns the options with most url parts already set to hit the seasonal team stats endpoint
func (*Service) NewSeasonalVenuesOptions ¶
func (s *Service) NewSeasonalVenuesOptions() *SeasonalVenuesOptions
NewSeasonalVenuesOptions - Returns the options with most url parts already set to hit the seasonal venues endpoint
func (*Service) PlayerInjuries ¶
func (s *Service) PlayerInjuries(options *PlayerInjuriesOptions) (PlayerInjuriesIO, int, error)
PlayerInjuries - hits the https://api.mysportsfeeds.com/{version/pull/{sport}/{season}/date/{date}/dfs.{format} endpoint
func (*Service) Players ¶
func (s *Service) Players(options *PlayersOptions) (PlayersIO, int, error)
Players - hits the https://api.mysportsfeeds.com/v2.0/pull/mlb/players.{format} endoint
func (*Service) SeasonalDfs ¶
func (s *Service) SeasonalDfs(options *SeasonalDfsOptions) (DfsIO, int, error)
SeasonalDfs - hits the https://api.mysportsfeeds.com/v2.0/pull/{sport}/{season}/dfs.{format} endpoint
func (*Service) SeasonalGames ¶
func (s *Service) SeasonalGames(options *SeasonalGamesOptions) (GamesIO, int, error)
SeasonalGames - hits the https://api.mysportsfeeds.com/v2.0/pull/mlb/{season}/games.{format} endoint
func (*Service) SeasonalPlayerGamelogs ¶
func (s *Service) SeasonalPlayerGamelogs(options *SeasonalPlayerGamelogsOptions) (GameLogIO, int, error)
SeasonalPlayerGamelogs - hits the https://api.mysportsfeeds.com/v2.0/pull/mlb/{season}/player_gamelogs.{format} endoint
func (*Service) SeasonalPlayerStats ¶
func (s *Service) SeasonalPlayerStats(options *SeasonalPlayerStatsOptions) (PlayerStatsTotalsIO, int, error)
SeasonalPlayerStats - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/player_stats_totals.{format} endoint
func (*Service) SeasonalTeamGamelogs ¶
func (s *Service) SeasonalTeamGamelogs(options *SeasonalTeamGamelogsOptions) (GameLogIO, int, error)
SeasonalTeamGamelogs - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/team_gamelogs.{format} endoint
func (*Service) SeasonalTeamStats ¶
func (s *Service) SeasonalTeamStats(options *SeasonalTeamStatsOptions) (TeamStatsTotalsIO, int, error)
SeasonalTeamStats - hits the https://api.mysportsfeeds.com/{version}/pull/{sport}/{season}/team_stats_totals.{format} endoint
func (*Service) SeasonalVenues ¶
func (s *Service) SeasonalVenues(options *SeasonalVenuesOptions) (VenuesIO, int, error)
SeasonalVenues - hits the https://api.mysportsfeeds.com/{version}/pull/{season}/{season}/venues.{format} endoint
type SigningTeam ¶
type StandingsIO ¶
type StandingsIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
Teams *[]Teams `json:"teams"`
References *References `json:"references"`
}
type StatReference ¶
type StatsHomeAway ¶
type StatsHomeAway struct {
Away *BoxscoreStats `json:"away"`
Home *BoxscoreStats `json:"home"`
}
type TeamLineup ¶
type TeamReference ¶
type TeamReference struct {
ID *int `json:"id"`
City *string `json:"city"`
Name *string `json:"name"`
Abbreviation *string `json:"abbreviation"`
HomeVenue *HomeVenue `json:"homeVenue"`
TeamColoursHex []interface{} `json:"teamColoursHex"`
SocialMediaAccounts []interface{} `json:"socialMediaAccounts"`
OfficialLogoImageSrc interface{} `json:"officialLogoImageSrc"`
}
type TeamStatsTotal ¶
type TeamStatsTotal struct {
Team *TeamReference `json:"team"`
Stats *Stats `json:"stats"`
}
type TeamStatsTotalsIO ¶
type TeamStatsTotalsIO struct {
LastUpdatedOn string `json:"lastUpdatedOn"`
TeamStatsTotals *[]TeamStatsTotal `json:"teamStatsTotals"`
}
type VenueReference ¶
type VenueReference struct {
ID *int `json:"id"`
Name *string `json:"name"`
City *string `json:"city"`
Country *string `json:"country"`
GeoCoordinates interface{} `json:"geoCoordinates"`
CapacitiesByEventType []interface{} `json:"capacitiesByEventType"`
PlayingSurface interface{} `json:"playingSurface"`
BaseballDimensions []interface{} `json:"baseballDimensions"`
HasRoof interface{} `json:"hasRoof"`
HasRetractableRoof interface{} `json:"hasRetractableRoof"`
}
type Venues ¶
type Venues struct {
Venue *VenueReference `json:"venue"`
HomeTeam *TeamReference `json:"homeTeam"`
}
Source Files
¶
- config.go
- config_url_variables.go
- current_season.go
- daily_dfs.go
- daily_games.go
- daily_player_gamelogs.go
- daily_standings.go
- daily_team_gamelogs.go
- feed_updates.go
- game_boxscore.go
- game_lineup.go
- game_play_by_play.go
- models.go
- player_injuries.go
- players.go
- seasonal_dfs.go
- seasonal_games.go
- seasonal_player_gamelogs.go
- seasonal_player_stats.go
- seasonal_team_gamelogs.go
- seasonal_team_stats.go
- seasonal_venues.go
- service.go