airi.py
Client module
- class airi.client.Client(token: str)
Main Airi Client class to use this library.
- async action(action: str)
To access action(S) endpoint
- Args:
action (str) : endpoint name, list of endpoint names can be found at: https://docs.airi.kyoyo.me/endpoints/
- Returns:
str: gif/image link (of action)
- async fact()
To access fact endpoint
- Returns:
class: Fact Object
- async password()
To access password endpoint
- Returns:
class: Password Object
- async quote()
To access quote endpoint
- Returns:
class: Quote Object
- async status() None
To check Client connection with API
- Returns:
int: status code
- async waifu()
To access waifu endpoint
- Returns:
class: Waifu Object
Model module
- class airi.model.Fact(id, fact, tags)
Fact Object Meant to be accessed via client class only, not directly
- Attributes:
id (int): id of the fact
fact (str): returns fact
tags (list of str): list of tags for the fact
- class airi.model.Password(password)
Password Object Meant to be accessed via client class only, not directly
- Attributes:
password (str): returns password
- class airi.model.Quote(id, quote, anime, said)
Quote Object Meant to be accessed via client class only, not directly
- Attributes:
id (int): id of the quote
quote (str): returns quote
anime (str): returns anime of quote
said (str): returns character who said the quote
- class airi.model.Waifu(id, images, names, anime, statistics)
Waifu Object Meant to be accessed via client class only, not directly
- Attributes:
id (int): id of the waifu
images (list of str): list of image urls
names (dict of str): dict of waifu names
anime (dict of str): dict of anime name & its type
statistics (dict of str, int pair): statistics of waifu