diff --git a/docs/index.rst b/docs/index.rst index 74f3f6e..e138982 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,20 +1,20 @@ -Welcome to PyBattlerite's documentation! +Welcome to PyVainglory's documentation! =========================================== Basic Usage:: - import pybattlerite + import pyvainglory import requests - brc = pybattlerite.Client('your-api-key') + vgc = pyvainglory.Client('your-api-key') - # You can also provide an aiohttp.ClientSession to the BRClient constructor + # You can also provide a requests.Session to the Client constructor session = requests.Session() - brc_a = pybattlerite.Client('your-api-key', session) + vgc_a = pyvainglory.Client('your-api-key', session) # Get 3 matches after specified time # after and before can also be datetime.datetime objects - matches = brc.get_matches(limit=3, after="2017-11-22T20:34:58Z") + matches = vgc.get_matches(limit=3, after="2017-11-22T20:34:58Z", region='na') # Go to the next pages of matches matches.next() @@ -22,21 +22,26 @@ Basic Usage:: # Get telemetry data for one of the matches telemetry = matches.matches[0].get_telemetry() + player = vgc.player_by_name('Demolasher36', region='sg') + my_blitz_games = player.games_played.blitz + + my_recent_games = vgc.get_matches(limit=3, after="2018-01-1T20:34:58Z", playernames=['Demolasher36'], region='sg') + Async Usage:: import aiohttp import asyncio - import pybattlerite + import pyvainglory - brc = pybattlerite.AsyncClient('your-api-key') + vgc = pyvainglory.AsyncClient('your-api-key') - # You can also provide an aiohttp.ClientSession to the BRClient constructor + # You can also provide an aiohttp.ClientSession to the AsyncClient constructor session = aiohttp.ClientSession() - brc_a = pybattlerite.AsyncClient('your-api-key', session) + vgc_a = pyvainglory.AsyncClient('your-api-key', session) # Get 3 matches after specified time # after and before can also be datetime.datetime objects - matches = await brc.get_matches(limit=3, after="2017-11-22T20:34:58Z") + matches = await vgc.get_matches(limit=3, after="2017-11-22T20:34:58Z", region='na') # Go to the next pages of matches await matches.next() @@ -44,6 +49,10 @@ Async Usage:: # Get telemetry data for one of the matches telemetry = await matches.matches[0].get_telemetry() + player = await vgc.player_by_name('Demolasher36', region='sg') + my_blitz_games = player.games_played.blitz + + my_recent_games = await vgc.get_matches(limit=3, after="2018-01-1T20:34:58Z", playernames=['Demolasher36'], region='sg') pyvainglory.Client ------------------------