Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶ added in v0.14.1
func DefaultConfig(key string) (api.EquinoxConfig, error)
Returns the default equinox config with a provided key.
- Key : The provided Riot API key.
- HTTPClient : http.Client with a timeout of 15 seconds.
- Cache : BigCache with an eviction time of 4 minutes.
- RateLimit : Internal rate limiter with a limit usage factor of 0.99 and interval overhead of 1 second.
- Logger : api.Logger object with zerolog.WarnLevel. Will log if rate limited or when retrying a request (before waiting).
- Retry : api.Retry object with a limit of 3 and jitter of 500 milliseconds.
func DefaultLogger ¶ added in v1.0.0
Returns the default logger config
- Level : zerolog.WarnLevel
- Pretty : false
- TimeFieldFormat : zerolog.TimeFormatUnix
- EnableConfigLogging : true
- EnableTimestamp : true
func DefaultRetry ¶ added in v1.0.0
Returns the default retry config
- MaxRetries : 3
- Jitter : 500 milliseconds
Types ¶
type Equinox ¶
type Equinox struct { Internal *internal.Client Cache *cache.Cache DDragon *ddragon.Client CDragon *cdragon.Client Riot *riot.Client LOL *lol.Client TFT *tft.Client VAL *val.Client LOR *lor.Client }
func NewClientWithConfig ¶ added in v0.3.0
func NewClientWithConfig(config api.EquinoxConfig) *Equinox
Creates a new equinox client using a custom configuration.
Directories ¶
Path | Synopsis |
---|---|
Package used to share common constants and structs.
|
Package used to share common constants and structs. |
Cache package to provide an interface to interact with cache stores.
|
Cache package to provide an interface to interact with cache stores. |
clients
|
|
cdragon
This package is used to interact with Community Dragon endpoints.
|
This package is used to interact with Community Dragon endpoints. |
ddragon
This package is used to interact with Data Dragon endpoints.
|
This package is used to interact with Data Dragon endpoints. |
lol
This package is used to interact with all LOL endpoints.
|
This package is used to interact with all LOL endpoints. |
lor
This package is used to interact with all LOR endpoints.
|
This package is used to interact with all LOR endpoints. |
riot
This package is used to interact with all Riot endpoints.
|
This package is used to interact with all Riot endpoints. |
tft
This package is used to interact with all TFT endpoints.
|
This package is used to interact with all TFT endpoints. |
val
This package is used to interact with all VAL endpoints.
|
This package is used to interact with all VAL endpoints. |
test
|
|
integration
This package only contains integration tests and are meant to be run manually.
|
This package only contains integration tests and are meant to be run manually. |
Click to show internal directories.
Click to hide internal directories.