Documentation
¶
Index ¶
- func TypeSchemas() map[reflect.Type]*jsonschema.Schema
- type Banzuke
- type Basho
- type BashoDayID
- type BashoID
- type BashoPrize
- type Client
- type Error
- type GetBanzukeAPI
- type GetBanzukeRequest
- type GetBashoAPI
- type GetBashoRequest
- type GetBashoWithTorikumiAPI
- type GetBashoWithTorikumiRequest
- type GetRikishiAPI
- type GetRikishiRequest
- type GetRikishiStatsAPI
- type GetRikishiStatsRequest
- type GetRikishiStatsResponse
- type Kimarite
- type ListKimariteAPI
- type ListKimariteMatchesAPI
- type ListKimariteMatchesRequest
- type ListKimariteMatchesResponse
- type ListKimariteRequest
- type ListKimariteResponse
- type ListMeasurementChangesAPI
- type ListRankChangesAPI
- type ListRikishiChangesRequest
- type ListRikishiMatchesAPI
- type ListRikishiMatchesAgainstOpponentAPI
- type ListRikishiMatchesAgainstOpponentRequest
- type ListRikishiMatchesAgainstOpponentResponse
- type ListRikishiMatchesRequest
- type ListRikishiMatchesResponse
- type ListShikonaChangesAPI
- type Match
- type MatchID
- type Measurement
- type Option
- type Rank
- type Rikishi
- type RikishiBanzuke
- type RikishiBanzukeMatch
- type RikishiChangeID
- type SearchRikishiAPI
- type SearchRikishiRequest
- type SearchRikishiResponse
- type Shikona
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TypeSchemas ¶ added in v0.5.0
func TypeSchemas() map[reflect.Type]*jsonschema.Schema
TypeSchemas returns the registered type schemas.
Types ¶
type Banzuke ¶ added in v0.4.0
type Banzuke struct {
BashoID BashoID `json:"bashoId" jsonschema:"The unique identifier for the basho (sumo tournament)."`
Division string `` /* 138-byte string literal not displayed */
East []RikishiBanzuke `json:"east,omitempty" jsonschema:"The banzuke (ranking list) for the east side of the division."`
West []RikishiBanzuke `json:"west,omitempty" jsonschema:"The banzuke (ranking list) for the west side of the division."`
}
Banzuke represents the ranking list of rikishi in a basho division.
type Basho ¶ added in v0.4.0
type Basho struct {
ID BashoID `json:"date" jsonschema:"The unique identifier for the basho (sumo tournament), in the format YYYYMM."`
StartDate *time.Time `json:"startDate,omitempty" jsonschema:"The starting date of the basho (sumo tournament)."`
EndDate *time.Time `json:"endDate,omitempty" jsonschema:"The ending date of the basho (sumo tournament)."`
Yusho []BashoPrize `` /* 152-byte string literal not displayed */
SpecialPrizes []BashoPrize `` /* 136-byte string literal not displayed */
Torikumi []Match `` /* 168-byte string literal not displayed */
}
Basho represents a sumo tournament.
type BashoDayID ¶ added in v0.3.0
BashoDayID represents a specific day within a basho (1-15), or a playoff match starting from 16.
func (BashoDayID) MarshalJSON ¶ added in v0.3.0
func (b BashoDayID) MarshalJSON() ([]byte, error)
func (BashoDayID) String ¶ added in v0.3.0
func (b BashoDayID) String() string
func (*BashoDayID) UnmarshalJSON ¶ added in v0.3.0
func (b *BashoDayID) UnmarshalJSON(data []byte) error
type BashoID ¶
BashoID represents the unique identifier for a basho.
func (BashoID) MarshalJSON ¶
func (*BashoID) UnmarshalJSON ¶
type BashoPrize ¶ added in v0.4.0
type BashoPrize struct {
Type string `` /* 299-byte string literal not displayed */
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier of the rikishi (sumo wrestler) who received the prize."`
ShikonaEnglish string `json:"shikonaEn,omitempty" jsonschema:"The shikona (ring name) of the rikishi (sumo wrestler) in English."`
ShikonaJapanese string `json:"shikonaJp,omitempty" jsonschema:"The shikona (ring name) of the rikishi (sumo wrestler) in Japanese."`
}
BashoPrize represents a prize awarded to a rikishi in a basho. It can be a yusho or a special prize.
type Client ¶
type Client interface {
SearchRikishiAPI
GetRikishiAPI
GetRikishiStatsAPI
ListRikishiMatchesAPI
ListRikishiMatchesAgainstOpponentAPI
GetBashoAPI
GetBanzukeAPI
GetBashoWithTorikumiAPI
ListKimariteAPI
ListKimariteMatchesAPI
ListMeasurementChangesAPI
ListRankChangesAPI
ListShikonaChangesAPI
}
Client is a client for the Sumo API.
type GetBanzukeAPI ¶ added in v0.4.0
type GetBanzukeAPI interface {
// GetBanzuke calls the GET /api/basho/{bashoID}/banzuke/{division} endpoint.
GetBanzuke(ctx context.Context, req GetBanzukeRequest) (*Banzuke, error)
}
GetBanzukeAPI defines the methods available for retrieving a banzuke.
type GetBanzukeRequest ¶ added in v0.4.0
type GetBanzukeRequest struct {
BashoID BashoID `` /* 181-byte string literal not displayed */
Division string `` /* 181-byte string literal not displayed */
}
GetBanzukeRequest represents the request parameters for the GetBanzuke method.
type GetBashoAPI ¶ added in v0.4.0
type GetBashoAPI interface {
// GetBasho calls the GET /api/basho/{bashoID} endpoint.
GetBasho(ctx context.Context, req GetBashoRequest) (*Basho, error)
}
GetBashoAPI defines the methods available for retrieving a basho.
type GetBashoRequest ¶ added in v0.4.0
type GetBashoRequest struct {
BashoID BashoID `` /* 150-byte string literal not displayed */
}
GetBashoRequest represents the request parameters for the GetBasho method.
type GetBashoWithTorikumiAPI ¶ added in v0.4.0
type GetBashoWithTorikumiAPI interface {
// GetBashoWithTorikumi calls the GET /api/basho/{bashoID}/torikumi/{division}/{day} endpoint.
GetBashoWithTorikumi(ctx context.Context, req GetBashoWithTorikumiRequest) (*Basho, error)
}
GetBashoWithTorikumiAPI defines the methods available for retrieving a basho.
type GetBashoWithTorikumiRequest ¶ added in v0.4.0
type GetBashoWithTorikumiRequest struct {
BashoID BashoID `` /* 150-byte string literal not displayed */
Division string `` /* 165-byte string literal not displayed */
Day int `` /* 178-byte string literal not displayed */
}
GetBashoWithTorikumiRequest represents the request parameters for the GetBashoWithTorikumi method.
type GetRikishiAPI ¶ added in v0.2.0
type GetRikishiAPI interface {
// GetRikishi calls the GET /api/rikishi/{rikishiID} endpoint.
GetRikishi(ctx context.Context, req GetRikishiRequest) (*Rikishi, error)
}
GetRikishiAPI defines the methods available for retrieving a single rikishi.
type GetRikishiRequest ¶ added in v0.2.0
type GetRikishiRequest struct {
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier of the rikishi (sumo wrestler) to retrieve. Example: 45 = Terunofuji"`
IncludeRanks bool `json:"includeRanks,omitempty" jsonschema:"Whether to include rank records over time in the rikishi (sumo wrestler) data."`
IncludeShikonas bool `` /* 139-byte string literal not displayed */
IncludeMeasurements bool `` /* 135-byte string literal not displayed */
}
GetRikishiRequest represents the request parameters for the GetRikishi method.
type GetRikishiStatsAPI ¶ added in v0.3.0
type GetRikishiStatsAPI interface {
// GetRikishiStats calls the GET /api/rikishi/{rikishiID}/stats endpoint.
GetRikishiStats(ctx context.Context, req GetRikishiStatsRequest) (*GetRikishiStatsResponse, error)
}
GetRikishiStatsAPI defines the methods available for retrieving statistics for a single rikishi.
type GetRikishiStatsRequest ¶ added in v0.3.0
type GetRikishiStatsRequest struct {
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier of the rikishi (sumo wrestler) to retrieve. Example: 45 = Terunofuji"`
}
GetRikishiStatsRequest represents the request parameters for the GetRikishiStats method.
type GetRikishiStatsResponse ¶ added in v0.3.0
type GetRikishiStatsResponse struct {
Basho int `` /* 127-byte string literal not displayed */
Yusho int `json:"yusho,omitempty" jsonschema:"The number of tournament championships (yusho) the rikishi (sumo wrestler) has won."`
TotalMatches int `json:"totalMatches,omitempty" jsonschema:"The total number of matches the rikishi (sumo wrestler) has had."`
TotalWins int `json:"totalWins,omitempty" jsonschema:"The total number of wins the rikishi (sumo wrestler) has achieved."`
TotalLosses int `json:"totalLosses,omitempty" jsonschema:"The total number of losses the rikishi (sumo wrestler) has suffered."`
TotalAbsences int `json:"totalAbsences,omitempty" jsonschema:"The total number of absences the rikishi (sumo wrestler) has had."`
Sansho map[string]int `` /* 149-byte string literal not displayed */
BashoByDivision map[string]int `` /* 178-byte string literal not displayed */
YushoByDivision map[string]int `` /* 177-byte string literal not displayed */
WinsByDivision map[string]int `` /* 148-byte string literal not displayed */
LossByDivision map[string]int `` /* 150-byte string literal not displayed */
AbsenceByDivision map[string]int `` /* 155-byte string literal not displayed */
TotalMatchesByDivision map[string]int `` /* 158-byte string literal not displayed */
}
GetRikishiStatsResponse represents the response from the GetRikishiStats method.
type Kimarite ¶ added in v0.3.0
type Kimarite struct {
Name string `json:"kimarite" jsonschema:"The kimarite (winning technique) name."`
Count int `json:"count" jsonschema:"The number of times this kimarite (winning technique) has been used in a match."`
LastUsage BashoDayID `` /* 217-byte string literal not displayed */
}
Kimarite represents a sumo wrestling winning technique.
type ListKimariteAPI ¶ added in v0.3.0
type ListKimariteAPI interface {
// ListKimarite calls the GET /api/kimarite endpoint.
ListKimarite(ctx context.Context, req ListKimariteRequest) (*ListKimariteResponse, error)
}
ListKimariteAPI defines the methods available for listing kimarite.
type ListKimariteMatchesAPI ¶ added in v0.3.0
type ListKimariteMatchesAPI interface {
// ListKimariteMatches calls the GET /api/kimarite/{kimarite} endpoint.
//
// Potential improvements:
// - Support filtering by basho ID like the other match listing endpoints.
ListKimariteMatches(ctx context.Context, req ListKimariteMatchesRequest) (*ListKimariteMatchesResponse, error)
}
ListKimariteMatchesAPI defines the methods available for listing matches for a single kimarite.
type ListKimariteMatchesRequest ¶ added in v0.3.0
type ListKimariteMatchesRequest struct {
Kimarite string `json:"kimarite" jsonschema:"The kimarite (winning technique) to list matches for."`
SortOrder string `` /* 261-byte string literal not displayed */
Limit int `json:"limit,omitempty" jsonschema:"The maximum number of results to return."`
Skip int `json:"skip,omitempty" jsonschema:"The number of results to skip over for pagination."`
}
ListKimariteMatchesRequest represents the request parameters for the ListKimariteMatches method.
type ListKimariteMatchesResponse ¶ added in v0.3.0
type ListKimariteMatchesResponse struct {
Limit int `json:"limit" jsonschema:"The maximum number of results that were returned."`
Skip int `json:"skip" jsonschema:"The number of results that were skipped over."`
Total int `json:"total" jsonschema:"The total number of matching results."`
Matches []Match `json:"records,omitempty" jsonschema:"The list of matches matching the filters."`
}
ListKimariteMatchesResponse represents the response from the ListKimariteMatches method.
type ListKimariteRequest ¶ added in v0.3.0
type ListKimariteRequest struct {
SortField string `json:"sortField" jsonschema:"The field by which to sort the results. Valid values are 'kimarite', 'count' and 'lastUsage'."`
SortOrder string `` /* 179-byte string literal not displayed */
Limit int `json:"limit,omitempty" jsonschema:"The maximum number of results to return."`
Skip int `json:"skip,omitempty" jsonschema:"The number of results to skip over for pagination."`
}
ListKimariteRequest represents the request parameters for the ListKimarite method.
type ListKimariteResponse ¶ added in v0.3.0
type ListKimariteResponse struct {
Limit int `json:"limit" jsonschema:"The maximum number of results that were returned."`
Skip int `json:"skip" jsonschema:"The number of results that were skipped over."`
SortField string `json:"sortField" jsonschema:"The field by which the results are sorted. Values are 'kimarite', 'count' and 'lastUsage'."`
SortOrder string `` /* 148-byte string literal not displayed */
Kimarite []Kimarite `json:"records,omitempty" jsonschema:"The list of kimarite (winning technique) records matching the filters."`
}
ListKimariteResponse represents the response from the ListKimarite method.
type ListMeasurementChangesAPI ¶ added in v0.2.0
type ListMeasurementChangesAPI interface {
// ListMeasurementChanges calls the GET /api/measurements endpoint.
ListMeasurementChanges(ctx context.Context, req ListRikishiChangesRequest) ([]Measurement, error)
}
ListMeasurementChangesAPI defines the methods available for listing rikishi measurement changes across bashos.
type ListRankChangesAPI ¶ added in v0.2.0
type ListRankChangesAPI interface {
// ListRankChanges calls the GET /api/ranks endpoint.
ListRankChanges(ctx context.Context, req ListRikishiChangesRequest) ([]Rank, error)
}
ListRankChangesAPI defines the methods available for listing rikishi rank changes across bashos.
type ListRikishiChangesRequest ¶ added in v0.2.0
type ListRikishiChangesRequest struct {
RikishiID int `` /* 147-byte string literal not displayed */
BashoID *BashoID `` /* 175-byte string literal not displayed */
SortOrder string `` /* 189-byte string literal not displayed */
}
ListRikishiChangesRequest represents a request to list Rikishi changes with optional filters.
type ListRikishiMatchesAPI ¶ added in v0.3.0
type ListRikishiMatchesAPI interface {
// ListRikishiMatches calls the GET /api/rikishi/{rikishiID}/matches endpoint.
//
// Documented bugs:
// - The API accepts and takes into account the limit and skip inputs, but they are not documented in the API guide.
// - The API response always returns 0 for the limit and skip outputs.
// - The API response does not return the match ID like in the GET /api/kimarite/{kimariteID} endpoint.
ListRikishiMatches(ctx context.Context, req ListRikishiMatchesRequest) (*ListRikishiMatchesResponse, error)
}
ListRikishiMatchesAPI defines the methods available for listing matches for a single rikishi.
type ListRikishiMatchesAgainstOpponentAPI ¶ added in v0.3.0
type ListRikishiMatchesAgainstOpponentAPI interface {
// ListRikishiMatchesAgainstOpponent calls the GET /api/rikishi/{rikishiID}/matches/{opponentID} endpoint.
//
// Documented bugs:
// - The API accepts and takes into account the limit and skip inputs, but they are not documented in the API guide.
// - The API response does not return the limit and skip outputs like in other endpoints.
// - The API response does not return the match ID like in the GET /api/kimarite/{kimariteID} endpoint.
ListRikishiMatchesAgainstOpponent(ctx context.Context, req ListRikishiMatchesAgainstOpponentRequest) (*ListRikishiMatchesAgainstOpponentResponse, error)
}
ListRikishiMatchesAgainstOpponentAPI defines the methods available for listing matches for a single rikishi and opponent pair.
type ListRikishiMatchesAgainstOpponentRequest ¶ added in v0.3.0
type ListRikishiMatchesAgainstOpponentRequest struct {
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier for the rikishi (sumo wrestler)."`
OpponentID int `json:"opponentId" jsonschema:"The unique identifier for the opponent rikishi (sumo wrestler)."`
BashoID *BashoID `json:"bashoId,omitempty" jsonschema:"The ID of the basho (sumo tournament) to filter matches by, in the format YYYYMM."`
Limit int `json:"limit,omitempty" jsonschema:"The maximum number of results to return."`
Skip int `json:"skip,omitempty" jsonschema:"The number of results to skip over for pagination."`
}
ListRikishiMatchesAgainstOpponentRequest represents the request parameters for the ListRikishiMatchesAgainstOpponent method.
type ListRikishiMatchesAgainstOpponentResponse ¶ added in v0.3.0
type ListRikishiMatchesAgainstOpponentResponse struct {
RikishiWins int `json:"rikishiWins" jsonschema:"The total number of wins for the rikishi against the opponent in the matching results."`
OpponentWins int `json:"opponentWins" jsonschema:"The total number of wins for the opponent against the rikishi in the matching results."`
KimariteWins map[string]int `` /* 146-byte string literal not displayed */
KimariteLosses map[string]int `` /* 150-byte string literal not displayed */
Limit int `json:"limit" jsonschema:"The maximum number of results that were returned."`
Skip int `json:"skip" jsonschema:"The number of results that were skipped over."`
Total int `json:"total" jsonschema:"The total number of matching results."`
Matches []Match `json:"matches,omitempty" jsonschema:"The list of matches matching the filters."`
}
ListRikishiMatchesAgainstOpponentResponse represents the response from the ListRikishiMatchesAgainstOpponent method.
type ListRikishiMatchesRequest ¶ added in v0.3.0
type ListRikishiMatchesRequest struct {
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier for the rikishi (sumo wrestler)."`
BashoID *BashoID `json:"bashoId,omitempty" jsonschema:"The ID of the basho (sumo tournament) to filter matches by, in the format YYYYMM."`
Limit int `json:"limit,omitempty" jsonschema:"The maximum number of results to return."`
Skip int `json:"skip,omitempty" jsonschema:"The number of results to skip over for pagination."`
}
ListRikishiMatchesRequest represents the request parameters for the ListRikishiMatches method.
type ListRikishiMatchesResponse ¶ added in v0.3.0
type ListRikishiMatchesResponse struct {
Limit int `json:"limit" jsonschema:"The maximum number of results that were returned."`
Skip int `json:"skip" jsonschema:"The number of results that were skipped over."`
Total int `json:"total" jsonschema:"The total number of matching results."`
Matches []Match `json:"records,omitempty" jsonschema:"The list of matches matching the filters."`
}
ListRikishiMatchesResponse represents the response from the ListRikishiMatches method.
type ListShikonaChangesAPI ¶ added in v0.2.0
type ListShikonaChangesAPI interface {
// ListShikonaChanges calls the GET /api/shikonas endpoint.
ListShikonaChanges(ctx context.Context, req ListRikishiChangesRequest) ([]Shikona, error)
}
ListShikonaChangesAPI defines the methods available for listing rikishi shikona changes across bashos.
type Match ¶ added in v0.3.0
type Match struct {
// ID is optional because it's not returned by the APIs for listing rikishi matches (possibly a bug).
ID *MatchID `json:"id,omitempty" jsonschema:"The unique identifier for the match in the format YYYYMM-{day}-{matchNo}-{eastId}-{westId}."`
BashoID BashoID `json:"bashoId" jsonschema:"The ID of the basho (sumo tournament) in which the match took place, in the format YYYYMM."`
Division string `json:"division" jsonschema:"The division in which the match took place."`
Day int `` /* 137-byte string literal not displayed */
MatchNumber int `json:"matchNo,omitempty" jsonschema:"The number of the match on the given day."`
EastID int `json:"eastId,omitempty" jsonschema:"The unique identifier for the rikishi (sumo wrestler) on the east side."`
EastShikona string `json:"eastShikona,omitempty" jsonschema:"The shikona (ring name) in English of the rikishi (sumo wrestler) on the east side."`
EastRank string `json:"eastRank,omitempty" jsonschema:"The rank of the rikishi (sumo wrestler) on the east side."`
WestID int `json:"westId,omitempty" jsonschema:"The unique identifier for the rikishi (sumo wrestler) on the west side."`
WestShikona string `json:"westShikona,omitempty" jsonschema:"The shikona (ring name) in English of the rikishi (sumo wrestler) on the west side."`
WestRank string `json:"westRank,omitempty" jsonschema:"The rank of the rikishi (sumo wrestler) on the west side."`
WinnerID int `json:"winnerId,omitempty" jsonschema:"The unique identifier for the winning rikishi (sumo wrestler)."`
WinnerEnglish string `json:"winnerEn,omitempty" jsonschema:"The shikona (ring name) in English of the winning rikishi (sumo wrestler)."`
WinnerJapanese string `json:"winnerJp,omitempty" jsonschema:"The shikona (ring name) in Japanese of the winning rikishi (sumo wrestler)."`
Kimarite string `json:"kimarite,omitempty" jsonschema:"The kimarite (winning technique) used in the match."`
}
Match represents a sumo match.
type MatchID ¶ added in v0.3.0
MatchID represents the unique identifier for a sumo match.
func (MatchID) MarshalJSON ¶ added in v0.3.0
func (*MatchID) UnmarshalJSON ¶ added in v0.3.0
type Measurement ¶
type Measurement struct {
ID RikishiChangeID `` /* 209-byte string literal not displayed */
BashoID BashoID `json:"bashoId" jsonschema:"The ID of the basho (sumo tournament) in the format YYYYMM."`
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier for the rikishi (sumo wrestler) in the API."`
Height float64 `` /* 145-byte string literal not displayed */
Weight float64 `` /* 143-byte string literal not displayed */
}
Measurement represents a rikishi's measurement in a specific basho.
type Option ¶
type Option func(*client)
Option is a function that configures a Client.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client for the Sumo API client.
type Rank ¶
type Rank struct {
ID RikishiChangeID `` /* 202-byte string literal not displayed */
BashoID BashoID `json:"bashoId" jsonschema:"The ID of the basho (sumo tournament) in the format YYYYMM."`
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier for the rikishi (sumo wrestler) in the API."`
HumanReadableName string `` /* 182-byte string literal not displayed */
NumericName int `` /* 140-byte string literal not displayed */
}
Rank represents a rikishi's rank in a specific basho.
type Rikishi ¶
type Rikishi struct {
ID int `json:"id" jsonschema:"The unique identifier for the rikishi (sumo wrestler) in the API."`
SumoDBID int `json:"sumodbId,omitempty" jsonschema:"The SumoDB ID of the rikishi (sumo wrestler)."`
OfficialID int `` /* 126-byte string literal not displayed */
ShikonaEnglish string `json:"shikonaEn,omitempty" jsonschema:"The shikona (ring name) of the rikishi (sumo wrestler) in English."`
ShikonaJapanese string `json:"shikonaJp,omitempty" jsonschema:"The shikona (ring name) of the rikishi (sumo wrestler) in Japanese."`
CurrentRank string `json:"currentRank,omitempty" jsonschema:"The current rank of the rikishi (sumo wrestler)."`
Heya string `json:"heya,omitempty" jsonschema:"The heya (stable) of the rikishi (sumo wrestler)."`
BirthDate *time.Time `json:"birthDate,omitempty" jsonschema:"The birth date of the rikishi (sumo wrestler)."`
Shusshin string `json:"shusshin,omitempty" jsonschema:"The place of birth of the rikishi (sumo wrestler)."`
Height float64 `json:"height,omitempty" jsonschema:"The height of the rikishi (sumo wrestler) in centimeters."`
Weight float64 `json:"weight,omitempty" jsonschema:"The weight of the rikishi (sumo wrestler) in kilograms."`
Debut *BashoID `` /* 145-byte string literal not displayed */
Intai *time.Time `json:"intai,omitempty" jsonschema:"The retirement date of the rikishi (sumo wrestler), if retired."`
RankHistory []Rank `` /* 205-byte string literal not displayed */
ShikonaHistory []Shikona `` /* 238-byte string literal not displayed */
MeasurementHistory []Measurement `` /* 234-byte string literal not displayed */
CreatedAt *time.Time `json:"createdAt,omitempty" jsonschema:"The timestamp when the rikishi (sumo wrestler) record was created in the API."`
UpdatedAt *time.Time `json:"updatedAt,omitempty" jsonschema:"The timestamp when the rikishi (sumo wrestler) record was last updated in the API."`
}
Rikishi represents a sumo wrestler.
type RikishiBanzuke ¶ added in v0.4.0
type RikishiBanzuke struct {
Side string `json:"side" jsonschema:"The side of the rikishi in the banzuke (ranking list). Either East or West."`
RikishiID int `json:"rikishiID" jsonschema:"The unique identifier for the rikishi (sumo wrestler)."`
ShikonaEnglish string `json:"shikonaEn" jsonschema:"The shikona (ring name) in English of the rikishi."`
ShikonaJapanese string `json:"shikonaJp" jsonschema:"The shikona (ring name) in Japanese of the rikishi."`
HumanReadableRankName string `` /* 172-byte string literal not displayed */
NumericRankName int `` /* 130-byte string literal not displayed */
Wins int `json:"wins" jsonschema:"The number of wins the rikishi (sumo wrestler) achieved in the specific basho (sumo tournament)."`
Losses int `json:"losses" jsonschema:"The number of losses the rikishi (sumo wrestler) had in the specific basho (sumo tournament)."`
Absences int `json:"absences" jsonschema:"The number of absences the rikishi (sumo wrestler) had in the specific basho (sumo tournament)."`
Matches []RikishiBanzukeMatch `` /* 142-byte string literal not displayed */
}
RikishiBanzuke represents a rikishi's ranking information in a basho division.
type RikishiBanzukeMatch ¶ added in v0.4.0
type RikishiBanzukeMatch struct {
OpponentShikonaEnglish string `json:"opponentShikonaEn" jsonschema:"The shikona (ring name) in English of the opponent rikishi (sumo wrestler)."`
OpponentShikonaJapanese string `json:"opponentShikonaJp" jsonschema:"The shikona (ring name) in Japanese of the opponent rikishi (sumo wrestler)."`
OpponentID int `json:"opponentID" jsonschema:"The unique identifier for the opponent rikishi (sumo wrestler)."`
Result string `` /* 232-byte string literal not displayed */
Kimarite string `json:"kimarite,omitempty" jsonschema:"The kimarite (technique) used in the match, if the match has already occurred."`
}
RikishiBanzukeMatch represents a match against an opponent in the banzuke.
type RikishiChangeID ¶ added in v0.2.0
RikishiChangeID represents the unique identifier for a rikishi change in a specific basho.
func (RikishiChangeID) MarshalJSON ¶ added in v0.2.0
func (r RikishiChangeID) MarshalJSON() ([]byte, error)
func (RikishiChangeID) String ¶ added in v0.3.0
func (r RikishiChangeID) String() string
func (*RikishiChangeID) UnmarshalJSON ¶ added in v0.2.0
func (r *RikishiChangeID) UnmarshalJSON(data []byte) error
type SearchRikishiAPI ¶ added in v0.3.0
type SearchRikishiAPI interface {
// SearchRikishi calls the GET /api/rikishis endpoint.
SearchRikishi(ctx context.Context, req SearchRikishiRequest) (*SearchRikishiResponse, error)
}
SearchRikishiAPI defines the methods available for searching rikishi.
type SearchRikishiRequest ¶ added in v0.3.0
type SearchRikishiRequest struct {
Shikona string `json:"shikona,omitempty" jsonschema:"The shikona (ring name) in English to search for. Example: Terunofuji"`
Heya string `json:"heya,omitempty" jsonschema:"The full name in English of the heya (stable) to search for. Example: Isegahama"`
SumoDBID int `json:"sumoDBID,omitempty" jsonschema:"The SumoDB ID to search for. Example: 11927 = Terunofuji"`
OfficialID int `` /* 141-byte string literal not displayed */
IncludeRetired bool `json:"includeRetired,omitempty" jsonschema:"Whether to include retired rikishi (sumo wrestlers) in the results."`
IncludeRanks bool `json:"includeRanks,omitempty" jsonschema:"Whether to include rank records over time in the rikishi (sumo wrestler) data."`
IncludeShikonas bool `` /* 139-byte string literal not displayed */
IncludeMeasurements bool `` /* 135-byte string literal not displayed */
Limit int `json:"limit,omitempty" jsonschema:"The maximum number of results to return."`
Skip int `json:"skip,omitempty" jsonschema:"The number of results to skip over for pagination."`
}
SearchRikishiRequest represents the request parameters for the SearchRikishi method.
type SearchRikishiResponse ¶ added in v0.3.0
type SearchRikishiResponse struct {
Limit int `json:"limit" jsonschema:"The maximum number of results that were returned."`
Skip int `json:"skip" jsonschema:"The number of results that were skipped over."`
Total int `json:"total" jsonschema:"The total number of matching results."`
Rikishi []Rikishi `json:"records,omitempty" jsonschema:"The list of rikishi (sumo wrestlers) matching the search criteria."`
}
SearchRikishiResponse represents the response from the SearchRikishi method.
type Shikona ¶
type Shikona struct {
ID RikishiChangeID `` /* 205-byte string literal not displayed */
BashoID BashoID `json:"bashoId" jsonschema:"The ID of the basho (sumo tournament) in the format YYYYMM."`
RikishiID int `json:"rikishiId" jsonschema:"The unique identifier for the rikishi (sumo wrestler) in the API."`
ShikonaEnglish string `` /* 130-byte string literal not displayed */
ShikonaJapanese string `` /* 131-byte string literal not displayed */
}
Shikona represents a rikishi's shikona in a specific basho.
Source Files
¶
- banzuke.go
- basho.go
- client.go
- get_banzuke.go
- get_basho.go
- get_basho_with_torikumi.go
- get_rikishi.go
- get_rikishi_stats.go
- kimarite.go
- list_kimarite.go
- list_kimarite_matches.go
- list_measurement_changes.go
- list_rank_changes.go
- list_rikishi_changes.go
- list_rikishi_matches.go
- list_rikishi_matches_against_opponent.go
- list_shikona_changes.go
- match.go
- measurement.go
- rank.go
- rikishi.go
- rikishi_change.go
- search_rikishi.go
- shikona.go
- type_schemas.go