RateLimitHandler

class riotwatcher.Handlers.RateLimit.RateLimitHandler
after_request(region, endpoint_name, method_name, url, response)

Called after a response is received and before it is returned to the user.

Parameters:
  • region (string) – the region of this request
  • endpoint_name (string) – the name of the endpoint that was requested
  • method_name (string) – the name of the method that was requested
  • url – The url that was requested
  • response – the response received. This is a response from the Requests library
preview_request(region, endpoint_name, method_name, url, query_params)

called before a request is processed.

Parameters:
  • region (string) – the region of this request
  • endpoint_name (string) – the name of the endpoint being requested
  • method_name (string) – the name of the method being requested
  • url – the URL that is being requested.
  • query_params – dict: the parameters to the url that is being queried, e.g. ?key1=val&key2=val2