nookipedia.api package

Submodules

nookipedia.api.api module

class nookipedia.api.api.API(api_key)

Bases: object

Uncached access to Nookipedia API endpoints

Parameters

api_key – Nookipedia API key

async get_villagers()Union[List[dict], dict]

GET /villagers

Returns

List of villagers as dict

async get_villager(name: str)dict

GET /villagers?name=name

Parameters

name – name of villager to fetch

Returns

JSON response as dict

async get_fishes()Union[List[dict], dict]

GET /nh/fish

Returns

List of fishes as dict

async get_fish(name: str)dict

GET /nh/fish/<name>

Parameters

name – name of new horizon fish to fetch

Returns

JSON response as dict

async get_bugs()Union[List[dict], dict]

GET /nh/bugs

Returns

List of bugs as dict

async get_bug(name: str)dict

GET /nh/bug/<name>

Parameters

name – name of new horizon bug to fetch

Returns

JSON response as dict

async get_fossil(name: str)dict

/fossil/<name>/ NOT YET SUPPORTED BY NEW API. :param name: name of fossil to fetch :return: JSON response as dict

async get_today(date: str = '')dict

/today/<date>/ NOT YET SUPPORTED BY NEW API. :param date: Optional, date in strtotime format (e.g. “tomorrow”, “+2 days”) :return: JSON response as dict

async get_villager_names()List[str]

GET /villagers?excludedetails=true to return list of villager names

Returns

list of villager names

async get_fish_names()List[str]

GET /nh/fish?excludedetails=true to return a list of fish names

Returns

list of critter names

async get_bug_names()List[str]

GET /nh/bug?excludedetails=true to return a list of bug names

Returns

list of critter names

async get_fossil_list()List[str]

parses /fossil/ as list of fossil names

Returns

list of fossil names

async get_category(name: str)List[str]

Uses the Category API endpoint to try and get a list of all names in a certain category.

Parameters

name – name of the category to get

Returns

list of names in that category

nookipedia.api.cached_api module

class nookipedia.api.cached_api.CachedAPI(api_key)

Bases: nookipedia.api.api.API

async get_villager(name: str)dict

GET /villagers?name=name

Parameters

name – name of villager to fetch

Returns

JSON response as dict

async get_fish(name: str)dict

GET /nh/fish/<name>

Parameters

name – name of new horizon fish to fetch

Returns

JSON response as dict

async get_bug(name: str)dict

GET /nh/bug/<name>

Parameters

name – name of new horizon bug to fetch

Returns

JSON response as dict

async get_fossil(name: str)dict

/fossil/<name>/ NOT YET SUPPORTED BY NEW API. :param name: name of fossil to fetch :return: JSON response as dict

Module contents