Skip to main content

Utillity

Language resource and PokéAPI's common models. TS-PokéAPI utility helpers.

Language​

Languages for translations of API resource information.

PropertyTypeRequiredDescription
idnumberYesThe identifier for this resource.
namestringYesThe identifier for this resource.
namesArray<Name>YesThe identifier for this resource.
officialbooleanYesWhether or not the games are published in this language.
iso639stringYesThe two-letter code of the country where this language is spoken. Note that it is not unique.
iso3166stringYesThe two-letter code of the language. Note that it is not unique.

Common​

APIResource​

PropertyTypeRequiredDescription
urlstringYesThe URL of the referenced resource.

Description​

PropertyTypeRequiredDescription
descriptionstringYesThe localized description for an API resource in a specific language.
languageNamedAPIResourceYesThe language this name is in.

Effect​

PropertyTypeRequiredDescription
effectstringYesThe localized effect text for an API resource in a specific language.
languageNamedAPIResourceYesThe language this name is in.

Encounter​

PropertyTypeRequiredDescription
min_levelnumberYesThe lowest level the Pokémon could be encountered at.
max_levelnumberYesThe highest level the Pokémon could be encountered at.
chancenumberYesPercent chance that this encounter will occur.
methodNamedAPIResourceYesThe method by which this encounter happens.
condition_valuesArray<NamedAPIResource>YesA list of condition values that must be in effect for this encounter to occur.

FlavorText​

PropertyTypeRequiredDescription
flavor_textstringYesThe localized flavor text for an API resource in a specific language. Note that this text is left unprocessed as it is found in game files. This means that it contains special characters that one might want to replace with their visible decodable version.
languageNamedAPIResourceYesThe language this name is in.
versionNamedAPIResourceYesThe game version this flavor text is extracted from.

GenerationGameIndex​

PropertyTypeRequiredDescription
game_indexnumberYesThe internal id of an API resource within game data.
generationNamedAPIResourceYesThe generation relevent to this game index.

MachineVersionDetail​

PropertyTypeRequiredDescription
machineAPIResourceYesThe machine that teaches a move from an item.
version_groupNamedAPIResourceYesThe version group of this specific machine.

Name​

PropertyTypeRequiredDescription
urlstringYesThe URL of the referenced resource.
languageNamedAPIResourceYesThe language this name is in.

NamedAPIResource​

PropertyTypeRequiredDescription
urlstringYesThe URL of the referenced resource.
namestringYesThe name of the referenced resource.

VerboseEffect​

PropertyTypeRequiredDescription
effectstringYesThe localized effect text for an API resource in a specific language.
short_effectstringYesThe localized effect text in brief.
languageNamedAPIResourceYesThe language this effect is in.

VersionEncounterDetail​

PropertyTypeRequiredDescription
versionNamedAPIResourceYesThe game version this encounter happens in.
max_chancenumberYesThe total percentage of all encounter potential.
encounter_detailsArray<Encounter>YesA list of encounters and their specifics.

VersionGameIndex​

PropertyTypeRequiredDescription
game_indexnumberYesThe internal id of an API resource within game data.
versionNamedAPIResourceYesThe version relevent to this game index.

VersionGroupFlavorText​

PropertyTypeRequiredDescription
textstringYesThe localized name for an API resource in a specific language.
languageNamedAPIResourceYesThe language this flavor text is in.
version_groupNamedAPIResourceYesThe version group which uses this flavor text.

Other​

Other interfaces and data structures exclusive from TS-PokéAPI to help you handle PokéAPI resource responses.

GenderId​

PaginatedResult​

PropertyTypeRequiredDescription
countnumberYesThe total number of resources available from this API.
nextstring, or nullYesThe URL for the next page in the list.
previousstring, or nullYesThe URL for the previous page in the list.
resultsArray<NamedAPIResource>YesA list of named API resources.

RelativePhysicalStatEvolution​

An enumeration of string values for each Pokémon type's name.

Types
Enumerable

Properties​

NameValue
RelativePhysicalStatEvolution.ATK_GT_DEF1
RelativePhysicalStatEvolution.ATK_EQ_DEF0
RelativePhysicalStatEvolution.ATK_LT_DEF-1

SubCollectionResource​

An enumeration of string values for each PokéApi resources that has a subcollection endpoint.

Types
enum('pokemon-location-area')

TimeOfDay​

An enumeration of string values for each Pokémon type's name.

Types
Enumerable

Properties​

NameValue
TimeOfDay.DAY'day'
TimeOfDay.NIGHT'night'
TimeOfDay.DUSK'dusk'

UnnamedPaginationResource​

An enumeration of string values for each PokéApi resources that returns only resource url data without name.

Types
enum('machine', 'characteristic', 'contest-effect', 'evolution-chain', 'super-contest-effect')