riotclientrl

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package riotclientrl is a utility package to check the Rate Limit responses of the Riot API and gives suggestions on how long to wait to avoid beeing rate limit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RiotClientRL

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

RiotClientRL Riot LoL API Rate Limit checker

func New

func New() (*RiotClientRL, error)

New creates a new Riot LoL API Rate Limit checker

func (*RiotClientRL) GetRateLimitRetryAt

func (c *RiotClientRL) GetRateLimitRetryAt(method string) time.Time

GetRateLimitRetryAt gets a time back at which it is allowed to do a new API call method: method name used for that API call

func (*RiotClientRL) UpdateRateLimits

func (c *RiotClientRL) UpdateRateLimits(header http.Header, method string)

UpdateRateLimits updates the rate limits from the given http header header: http header containing rate limit information method: method name of the api endpoint used

Jump to

Keyboard shortcuts

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