from leagueoflegends import LeagueOfLegends, RiotError lol = LeagueOfLegends('RGAPIfcf985395c46447e815d77ae80c424be') # Call the API with explicit summoner ID id = lol.get_summoner_by_name('thispassing') lol.get_games(id)
from leagueoflegends import LeagueOfLegends, RiotError from nose.tools import * import doctest import time import os doctest.testfile('README.md', verbose=False) api_key = os.environ['LOL_API_KEY'] lol = LeagueOfLegends(api_key) TEST_SUMMONER_ID = 5908 TEST_SUMMONER_NAME = "Dyrus" TEST_SUMMONER_IDS = [5908, 120546, 19347723] TEST_SUMMONER_NAMES = ["Dyrus", "RiotPhreak", "PhantomL0rd"] # Test region switching def test_region_set(): url = lol.set_api_region('euw') assert url == 'https://euw.api.pvp.net/api/lol/euw/v1.4/' url = lol.set_api_region('azeroth') assert url == None lol.set_api_region('na') # Test version switching def test_version_set():