Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Base API URL format
BaseURLFormat = "https://%s.api.riotgames.com"
)
Variables ¶
View Source
var ( NotFoundError = ErrorResponse{ Status: Status{ Message: "Not Found", StatusCode: http.StatusNotFound, }, } Status: Status{ Message: "Unauthorized", StatusCode: http.StatusUnauthorized, }, } ForbiddenError = ErrorResponse{ Status: Status{ Message: "Forbidden", StatusCode: http.StatusForbidden, }, } RateLimitedError = ErrorResponse{ Status: Status{ Message: "Rate limited", StatusCode: http.StatusTooManyRequests, }, } )
Functions ¶
This section is empty.
Types ¶
type ContentDTO ¶ added in v0.7.2
type EquinoxConfig ¶ added in v0.3.0
type EquinoxConfig struct { // Riot API Key. Key string // Cluster name, using the nearest cluster to you is recommended. Cluster Cluster // Log level. Default: api.FatalLevel LogLevel LogLevel // Timeout for http.Request in seconds, 0 disables it. Default: 10 Timeout time.Duration // Retry request if it returns a 429 status code. Default: true Retry bool }
An config object for the EquinoxClient.
func (*EquinoxConfig) MarshalLogObject ¶ added in v0.7.0
func (c *EquinoxConfig) MarshalLogObject(encoder zapcore.ObjectEncoder) error
type ErrorResponse ¶ added in v0.3.0
type ErrorResponse struct {
Status Status `json:"status"`
}
func (ErrorResponse) Error ¶ added in v0.3.0
func (e ErrorResponse) Error() string
type IncidentSeverity ¶ added in v0.7.2
type IncidentSeverity string
const ( InfoSeverity IncidentSeverity = "info" WarningSeverity IncidentSeverity = "warning" CriticalSeverity IncidentSeverity = "critical" )
type PlainTextResponse ¶ added in v0.7.4
type PlainTextResponse struct {
Response any `json:"response"`
}
type PlatformDataDTO ¶ added in v0.7.2
type PublishLocation ¶ added in v0.7.2
type PublishLocation string
const ( RiotClientLocation PublishLocation = "riotclient" RiotStatusLocation PublishLocation = "riotstatus" GameLocation PublishLocation = "game" )
type StatusDTO ¶ added in v0.7.2
type StatusDTO struct { ArchiveAt time.Time `json:"archive_at"` Titles []ContentDTO `json:"titles"` UpdatedAt time.Time `json:"updated_at"` IncidentSeverity IncidentSeverity `json:"incident_severity"` Platforms []Platform `json:"platforms"` Updates []UpdateDTO `json:"updates"` CreatedAt time.Time `json:"created_at"` ID int `json:"id"` MaintenanceStatus string `json:"maintenance_status"` }
type UpdateDTO ¶ added in v0.7.2
type UpdateDTO struct { UpdatedAt time.Time `json:"updated_at"` Translations []ContentDTO `json:"translations"` Author string `json:"author"` Publish bool `json:"publish"` CreatedAt time.Time `json:"created_at"` ID int `json:"id"` PublishLocations []PublishLocation `json:"publish_locations"` }
Click to show internal directories.
Click to hide internal directories.