riotwatcher.Handlers package¶
Submodules¶
riotwatcher.Handlers.JsonifyHandler module¶
-
class
riotwatcher.Handlers.JsonifyHandler.
JsonifyHandler
¶ Bases:
riotwatcher.Handlers.RequestHandler.RequestHandler
-
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
-
after_static_request
(url, response)¶ Called after a response is received and before it is returned to the user.
Parameters: - url – The url that was requested
- response – the response received. This is a response from the Requests library
-
riotwatcher.Handlers.RequestHandler module¶
-
class
riotwatcher.Handlers.RequestHandler.
RequestHandler
¶ Bases:
object
-
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
-
after_static_request
(url, response)¶ Called after a response is received and before it is returned to the user.
Parameters: - 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
-
preview_static_request
(url, query_params)¶ Called before a request to DataDragon is processed
Parameters: url – The url that was requested
-
riotwatcher.Handlers.ThrowOnErrorHandler module¶
-
class
riotwatcher.Handlers.ThrowOnErrorHandler.
ThrowOnErrorHandler
¶ Bases:
riotwatcher.Handlers.RequestHandler.RequestHandler
-
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
-
Module contents¶
-
class
riotwatcher.Handlers.
RequestHandler
¶ Bases:
object
-
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
-
after_static_request
(url, response)¶ Called after a response is received and before it is returned to the user.
Parameters: - 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
-
preview_static_request
(url, query_params)¶ Called before a request to DataDragon is processed
Parameters: url – The url that was requested
-
-
class
riotwatcher.Handlers.
DeprecationHandler
¶ Bases:
riotwatcher.Handlers.RequestHandler.RequestHandler
-
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
-
-
class
riotwatcher.Handlers.
JsonifyHandler
¶ Bases:
riotwatcher.Handlers.RequestHandler.RequestHandler
-
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
-
after_static_request
(url, response)¶ Called after a response is received and before it is returned to the user.
Parameters: - url – The url that was requested
- response – the response received. This is a response from the Requests library
-
-
riotwatcher.Handlers.
ApiError
¶ alias of
requests.exceptions.HTTPError
-
class
riotwatcher.Handlers.
ThrowOnErrorHandler
¶ Bases:
riotwatcher.Handlers.RequestHandler.RequestHandler
-
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
-
-
class
riotwatcher.Handlers.
TypeCorrectorHandler
¶ Bases:
riotwatcher.Handlers.RequestHandler.RequestHandler
The TypeCorrector class is meant to correct any inconsistencies in the types of objects provided as query parameters.
Currently this only involves changing boolean values into strings, as the API only accepts lower case booleans for some reason.
-
preview_request
(region, endpoint_name, method_name, url, query_params)¶ called before a request is processed.
Parameters: - 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
-
-
class
riotwatcher.Handlers.
WaitingRateLimitHandler
¶ Bases:
riotwatcher.Handlers.RateLimit.RateLimitHandler.RateLimitHandler