52 lines
1.6 KiB
Go
52 lines
1.6 KiB
Go
package domain
|
|
|
|
import "encoding/json"
|
|
|
|
type BaseNonLiveOddResponse struct {
|
|
Success int `json:"success"`
|
|
Results []json.RawMessage `json:"results"`
|
|
}
|
|
|
|
type OddsSection struct {
|
|
UpdatedAt string `json:"updated_at"`
|
|
Sp map[string]OddsMarket `json:"sp"`
|
|
}
|
|
|
|
// The Market ID for the json data can be either string / int which is causing problems when UnMarshalling
|
|
type OddsMarket struct {
|
|
ID json.RawMessage `json:"id"`
|
|
Name string `json:"name"`
|
|
Odds []json.RawMessage `json:"odds"`
|
|
Header string `json:"header,omitempty"`
|
|
Handicap string `json:"handicap,omitempty"`
|
|
Open int64 `json:"open,omitempty"`
|
|
}
|
|
|
|
type FootballOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
AsianLines OddsSection `json:"asian_lines"`
|
|
Goals OddsSection `json:"goals"`
|
|
Half OddsSection `json:"half"`
|
|
}
|
|
|
|
type BasketballOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
HalfProps OddsSection `json:"half_props"`
|
|
QuarterProps OddsSection `json:"quarter_props"`
|
|
TeamProps OddsSection `json:"team_props"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|
|
|
|
type IceHockeyOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
Main2 OddsSection `json:"main_2"`
|
|
FirstPeriod OddsSection `json:"1st_period"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|