aioruneclient

Module Contents

Classes

AioRuneClient(self,session=None,loop=None) An asynchronous version of RuneClient used to fetch optimal runes for champions.
class AioRuneClient(session=None, loop=None)

An asynchronous version of RuneClient used to fetch optimal runes for champions. You can find a brief example here.

session : aiohttp.ClientSession, optional
The aiohttp session used in all requests. If none is provided, a new session will be created.
loop : asyncio.AbstractEventLoop, optional
The asyncio event loop. If none is provided, a new loop will be created.
HEADERS : dict
Firefox headers for the particular version used to inspect the html.
URL : str
The runeforge.gg url used in requests.
rune_links : dict
This is the data contained in the rune_links.json file.

The rune_links data is structured like so:

{
  "aatrox": [
    "http://runeforge.gg/loadouts/die-and-be-forgotten/"
  ],
  "ahri": [
    "http://runeforge.gg/loadouts/the-poking-fox/",
    "http://runeforge.gg/loadouts/burst-snowball-carry/"
  ], ...
}
__init__(session=None, loop=None)
_get(url)

A small wrapper method which makes a quick GET request

url : str
The URL to get.
str
The raw html of the requested page.
RuneConnectionError
If the GET response status is not 200.
update_champs()

A method which updates the rune_links.json file and self.rune_links. This is useful because runeforge.gg is frequently updating.

RuneConnectionError
If the request does not return with a status of 200.
get_raw(champion_name)

A method to retrieve raw optimal runes for a given champion.

champion_name : str
Case insensitive name of the champion to get runes for.
Tuple[dict]
A tuple of dicts which contain the rune information.

Please see raw_return_formatting for more information on the return type.

ChampNotFoundError
If the champion is not found in self.rune_links.
get_runes(champion_name)

A method to retrieve a champion’s runepage objects.

champion_name : str
Case insensitive name of the champion to get runes for.
Tuple[Champion]
A tuple of Champions.

Please see abs_return_formatting and Champion for more information on the return type.

ChampNotFoundError
If the champion is not found in self.rune_links.