Brawl Stars API
This Python package is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Python 2.7 and 3.4+
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 brawlstars_api
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 brawlstars_api
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import brawlstars_api
from brawlstars_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: JWT
configuration = brawlstars_api.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 = brawlstars_api.BrawlersApi(brawlstars_api.ApiClient(configuration))
brawler_id = 'brawler_id_example' # str | Identifier of the brawler.
try:
# Get information about a brawler.
api_response = api_instance.get_brawler(brawler_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BrawlersApi->get_brawler: %s\n" % e)
# Configure API key authorization: JWT
configuration = brawlstars_api.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 = brawlstars_api.BrawlersApi(brawlstars_api.ApiClient(configuration))
before = 'before_example' # str | Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. (optional)
after = 'after_example' # str | Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. (optional)
limit = 56 # int | Limit the number of items returned in the response. (optional)
try:
# Get list of available brawlers.
api_response = api_instance.get_brawlers(before=before, after=after, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling BrawlersApi->get_brawlers: %s\n" % e)
All URIs are relative to https://api.brawlstars.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
BrawlersApi | get_brawler | GET /brawlers/{brawlerId} | Get information about a brawler. |
BrawlersApi | get_brawlers | GET /brawlers | Get list of available brawlers. |
ClubsApi | get_club | GET /clubs/{clubTag} | Get club information. |
ClubsApi | get_club_members | GET /clubs/{clubTag}/members | List club members. |
PlayersApi | get_battle_log | GET /players/{playerTag}/battlelog | Get log of recent battles for a player. |
PlayersApi | get_player | GET /players/{playerTag} | Get player information |
RankingsApi | get_brawler_rankings | GET /rankings/{countryCode}/brawlers/{brawlerId} | Get brawler rankings for a country or global rankings. |
RankingsApi | get_club_rankings | GET /rankings/{countryCode}/clubs | Get club rankings for a country or global rankings. |
RankingsApi | get_player_rankings | GET /rankings/{countryCode}/players | Get player rankings for a country or global rankings. |
- Battle
- BattleList
- BattleResult
- Brawler
- BrawlerList
- BrawlerStat
- BrawlerStatList
- ClientError
- Club
- ClubMember
- ClubMemberList
- ClubRanking
- ClubRankingList
- Event
- JsonLocalizedName
- Player
- PlayerClub
- PlayerRanking
- PlayerRankingClub
- PlayerRankingList
- StarPower
- StarPowerList
- Type: API key
- API key parameter name: authorization
- Location: HTTP header