一个薄薄的包装周围的暴乱游戏的传奇联盟API。
Riot-A的Python项目详细描述
您可以在github上找到这个项目:https://github.com/Alex-Weatherhead/riot_api
您可以在pypi上找到这个项目:https://pypi.org/manage/project/Riot-API/releases/
进行API调用
每个api调用都返回一个dictionary对象,该对象包含用于管理客户端程序的控制流的有用信息。
如果请求成功,那么字典只包含一个标志和响应的jsonified主体。
{"successful":True,"body":response.json()}
但是,如果请求不成功,字典将包含有关遇到的错误的信息,以及是否应重试请求的信息,如果是,则包含初始请求之后客户端程序应等待多长时间才能重试的信息。
{"successful":False,"error":{"status_code":status_code,"reason":reason},"retry":False,"delay":delay# If retry is True, this is the amount of time the client program should wait before retrying the request.}