sports

package
v0.0.0-...-2f87fcc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NbaScheduleEndpoint = "https://cdn.nba.com/static/json/staticData/scheduleLeagueV2.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NbaClient

type NbaClient struct {
	// contains filtered or unexported fields
}

func GetNbaClient

func GetNbaClient(restClient *resty.Client) *NbaClient

func (*NbaClient) ConvertNbaScheduleToSampleTask

func (nc *NbaClient) ConvertNbaScheduleToSampleTask(schedule NbaMatchSchedule) *persistence.SampleTask

func (*NbaClient) ConvertRawDataToNbaMatchSchedule

func (nc *NbaClient) ConvertRawDataToNbaMatchSchedule(seasonYear string, game []byte) NbaMatchSchedule

func (*NbaClient) FetchAndStoreNbaScheduleData

func (nc *NbaClient) FetchAndStoreNbaScheduleData()

func (*NbaClient) FetchNbaScheduleData

func (nc *NbaClient) FetchNbaScheduleData(scheduleEndPoint string) *NbaMatchScheduleData

func (*NbaClient) FormContentBasedOnNbaSchedule

func (nc *NbaClient) FormContentBasedOnNbaSchedule(schedule NbaMatchSchedule) string

type NbaMatchSchedule

type NbaMatchSchedule struct {
	GameId       string    `json:"game_id"`
	SeasonYear   string    `json:"season_year"`
	GameDate     time.Time `json:"game_date"`
	GameTimeEt   time.Time `json:"game_time_et"`
	HomeTeamName string    `json:"home_team_name"`
	AwayTeamName string    `json:"way_away_team_name"`
	ArenaName    string    `json:"arena_name"`
	ArenaState   string    `json:"arena_state"`
	ArenaCity    string    `json:"arena_city"`
	Raw          string    `json:"raw"`
}

Serializer for Dividends response

type NbaMatchScheduleData

type NbaMatchScheduleData struct {
	NbaMatchSchedules []NbaMatchSchedule `json:"nba_match_schedule_data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL