Skip to main content

A thin wrapper around the Riot Games API for League of Legends.

Project description

You can find this project on GitHub at: https://github.com/Alex-Weatherhead/riot_api

You can find this project on PyPi at: https://pypi.org/manage/project/Riot-API/releases/

Making API Calls

Each API call returns a dictionary object containing useful information for managing the control flow of the client program.

If a request is successful, then the dictionary simply contains a flag and the jsonified body of the response.

{
    "successful": True,
    "body": response.json()
}

However, if a request is not successful, the dictionary contains information about the error encountered, as well as whether the request should be retried, and if so, how long after the initial request the client program should wait before retrying.

{
    "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.
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Riot API-0.0.14.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

Riot_API-0.0.14-py3-none-any.whl (20.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page