-
Notifications
You must be signed in to change notification settings - Fork 14
Rate Limit Service
Yuhan Fang edited this page Nov 19, 2017
·
1 revision
A common problem for large-scale scraping of the Riot API is synchronization of limits and quota across multiple clients. This package provides a ratelimit server that centralizes quota management. Here is an example of how to set up the client to point to the rate limiting service:
server, err := url.Parse("http://your-server-here:1234")
limiter := client.New(http.DefaultClient, server)
client := apiclient.New("MY_API_KEY", http.DefaultClient, limiter)
Separately, you need to start the server listening on that port:
ratelimit_service --port=1234
The rate limit server is a simple RESTful service, and isn't limited to Go. See the service documentation for details on the REST API.