Clash Royale API wrapper for Python 3
Project description
pyroyale
Unofficial Swagger docs for the official Clash Royale API
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import pyroyale
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import pyroyale
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import pyroyale
from pyroyale.rest import ApiException
from pprint import pprint
# Configure API key authorization: JWT
configuration = pyroyale.Configuration()
configuration.api_key['authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['authorization'] = 'Bearer'
# create an instance of the API class
api_instance = pyroyale.CardsApi(pyroyale.ApiClient(configuration))
try:
# Get list of available cards
api_response = api_instance.get_cards()
pprint(api_response)
except ApiException as e:
print("Exception when calling CardsApi->get_cards: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.clashroyale.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
CardsApi | get_cards | GET /cards | Get list of available cards |
ClansApi | get_clan | GET /clans/{clanTag} | Get clan information |
ClansApi | get_clan_members | GET /clans/{clanTag}/members | List clan members |
ClansApi | get_clan_war_log | GET /clans/{clanTag}/warlog | Retrieve clan's clan war log |
ClansApi | get_current_war | GET /clans/{clanTag}/currentwar | Information about clan's current clan war |
ClansApi | search_clans | GET /clans | Search clans |
LocationsApi | get_clan_ranking | GET /locations/{locationId}/rankings/clans | Get clan rankings for a specific location |
LocationsApi | get_clan_wars_ranking | GET /locations/{locationId}/rankings/clanwars | Get clan war rankings for a specific location |
LocationsApi | get_location | GET /locations/{locationId} | Get location information |
LocationsApi | get_locations | GET /locations | List locations |
LocationsApi | get_player_ranking | GET /locations/{locationId}/rankings/players | Get player rankings for a specific location |
PlayersApi | get_player | GET /players/{playerTag} | Get player information |
PlayersApi | get_player_battles | GET /players/{playerTag}/battlelog | Get log of recent battles for a player |
PlayersApi | get_player_upcoming_chests | GET /players/{playerTag}/upcomingchests | Get information about player's upcoming chests |
TournamentsApi | get_global_tournaments | GET /globaltournaments | List global tournaments |
TournamentsApi | get_tournament | GET /tournaments/{tournamentTag} | Get tournament information |
TournamentsApi | search_tournaments | GET /tournaments | Search tournaments |
Documentation For Models
- Arena
- BattleLog
- BattleLogInner
- BattleLogInnerGameMode
- BattleLogTeam
- BattleLogTeamCards
- CardList
- Clan
- ClanBase
- ClanMember
- ClanMemberList
- ClanRankingList
- ClanRankingListItems
- ClanSearchResult
- ClanWarsRankingList
- CurrentWar
- CurrentWarClan
- Error
- Location
- LocationList
- PlayerBase
- PlayerDetail
- PlayerDetailAchievements
- PlayerDetailCards
- PlayerDetailCurrentFavouriteCard
- PlayerDetailIconUrls
- PlayerDetailLeagueStatistics
- PlayerRankingList
- PlayerRankingListItems
- SearchResultClan
- SeasonStatistics
- Tournament
- TournamentBase
- TournamentBaseItems
- TournamentMembersList
- TournamentSearchResult
- UpcomingChestsList
- UpcomingChestsListItems
- WarClan
- WarLog
- WarLogItems
- WarParticipant
- WarStanding
- WarStandingClan
Documentation For Authorization
JWT
- Type: API key
- API key parameter name: authorization
- Location: HTTP header
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyroyale-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f105344a2537a7dea314d1aaaebbe72473f33b94a5efc9cc694e7d615d842831 |
|
MD5 | 5cb0d956b5fc41ee9381477853808bea |
|
BLAKE2b-256 | 1c4541ae7c02016b709a88839c8c0e6a4f8dfd63d4236fb9e6fd5e6ae446fad7 |