Skip to main content

nintendo-switch-eshop

Enumerations

Classes

Interfaces

References

getGamesAmerica

Renames and re-exports default

Variables

EU_GET_GAMES_URL

β€’ EU_GET_GAMES_URL: "http://search.nintendo-europe.com/{locale}/select"

URL for getting EU Games

Defined in

lib/utils/constants.ts:48


JP_GET_GAMES_URL

β€’ JP_GET_GAMES_URL: "https://www.nintendo.co.jp/data/software/xml/switch.xml"

URL for getting JP Games

Defined in

lib/utils/constants.ts:75


PRICE_GET_URL

β€’ PRICE_GET_URL: "https://api.ec.nintendo.com/v1/price"

URL for getting game prices

Defined in

lib/utils/constants.ts:96


QUERIED_US_ALGOLIA_KEY

β€’ QUERIED_US_ALGOLIA_KEY: "6efbfb0f8f80defc44895018caf77504"

Algolia key for getting US games with a query

Defined in

lib/utils/constants.ts:8


QUERIED_US_GET_GAMES_URL

β€’ QUERIED_US_GET_GAMES_URL: string

URL for getting Queried US Games

Defined in

lib/utils/constants.ts:14


US_ALGOLIA_HEADERS

β€’ US_ALGOLIA_HEADERS: Object

internal Request headers for US games

Type declaration

NameType
Content-Typestring
X-Algolia-API-Keystring
X-Algolia-Application-Idstring

Defined in

lib/utils/constants.ts:29


US_ALGOLIA_ID

β€’ US_ALGOLIA_ID: "U3B6GR4UA3"

Algolia ID for getting US games

Defined in

lib/utils/constants.ts:2


US_ALGOLIA_KEY

β€’ US_ALGOLIA_KEY: "c4da8be7fd29f0f5bfa42920b0a99dc7"

Algolia Key for getting US games

Defined in

lib/utils/constants.ts:5


US_GET_GAMES_URL

β€’ US_GET_GAMES_URL: string

URL for getting US Games

Defined in

lib/utils/constants.ts:11

Functions

default

β–Έ Const default(): Promise<GameUS[]>

Fetches all games on american e-shops

remarks Currently ONLY returns all games in the e-shop

Returns

Promise<GameUS[]>

Promise containing all the games

Defined in

lib/getGames/getGamesAmerica.ts:15


getActiveShops

β–Έ Const getActiveShops(): Promise<EShop[]>

Gets all active eShops.

remarks This method will launch several requests at nintendo web services, so don't abuse it.

Returns

Promise<EShop[]>

A list of shop objects with country code, name and default currency.

Defined in

lib/getShops/getActiveShops.ts:14


getGamesEurope

β–Έ Const getGamesEurope(options?): Promise<GameEU[]>

Fetches all games on the European, Australian or New Zealand eShops

remarks Games from Australia / New Zealand can be limited. They are included only as much as that Nintendo assigns them properly to the PAL region

Parameters

NameTypeDescription
optionsEURequestOptionsRequest options to pass to the eShop request See EURequestOptions for details

Returns

Promise<GameEU[]>

Promise containing all requested EU/PAL games

Defined in

lib/getGames/getGamesEurope.ts:16


getGamesJapan

β–Έ Const getGamesJapan(): Promise<GameJP[]>

Fetches all games on japanese eShops

Returns

Promise<GameJP[]>

Promise containing all the games

Defined in

lib/getGames/getGamesJapan.ts:12


getPrices

β–Έ Const getPrices(country, gameIds, offset?, prices?): Promise<PriceResponse>

Gets pricing information for the requested games. Paginates every 50 games.

Parameters

NameTypeDefault valueDescription
countrystringundefinedA two digit country code. (ISO 3166-1 alpha-2 country code)
gameIdsstring | string[]undefinedOne or more NSUID of the corresponding games.
offsetnumber0(Optional) The offset to start at
pricesTitleData[][](Optional) An array of TitleData

Returns

Promise<PriceResponse>

A promise containing the pricing information.

Defined in

lib/other/getPrices.ts:16


getQueriedGamesAmerica

β–Έ Const getQueriedGamesAmerica(query, __namedParameters?): Promise<QueriedGameUS[]>

Fetches a subset of games from the American e-shops as based on a given query

license Apache-2.0 Favna & Antonio RomΓ‘n

copyright 2019

Parameters

NameTypeDescription
querystringThe query to search for
__namedParametersQueriedGamesAmericaOptionsAdditional options for the getQueriedGamesAmerica call. Defaults to { hitsPerPage: 200, page: 0 }

Returns

Promise<QueriedGameUS[]>

Promise containing the first hitsPerPage games that match your query

Defined in

lib/getGames/getQueriedGamesAmerica.ts:15


getShopsAmerica

β–Έ Const getShopsAmerica(): Promise<EShop[]>

Gets all active eShops on American countries.

remarks This method will launch several requests at nintendo web services, so don't abuse it.

Returns

Promise<EShop[]>

A list of shop objects with country code, name and default currency.

Defined in

lib/getShops/getShopsAmerica.ts:14


getShopsAsia

β–Έ Const getShopsAsia(): Promise<EShop[]>

Gets all active eShops on Asian countries

remarks This method will launch several requests at nintendo web services, so don't abuse it.

Returns

Promise<EShop[]>

A list of shop objects with country code, name and default currency.

Defined in

lib/getShops/getShopsAsia.ts:14


getShopsByCountryCodes

β–Έ Const getShopsByCountryCodes(countryCodes, gameCode, region): Promise<EShop[]>

Gets all active eShops given a list of countries.

Parameters

NameTypeDescription
countryCodesstring[]A list of 2 digit country codes for every country eShop to lookup. (ISO 3166-1 alpha-2 country codes)
gameCodestringA 14 digits game NSUID from the desired region.
regionRegionA region id that will be appended in the final shop object for filtering purposes.

Returns

Promise<EShop[]>

A list of shop objects with country code, name and default currency.

Defined in

lib/other/getShopByCountryCode.ts:14


getShopsEurope

β–Έ Const getShopsEurope(): Promise<EShop[]>

Gets all active eShops on European countries.

remarks This method will launch several requests at nintendo web services, so don't abuse it.

Returns

Promise<EShop[]>

A list of shop objects with country code, name and default currency.

Defined in

lib/getShops/getShopsEurope.ts:14


parseGameCode

β–Έ Const parseGameCode(game, region): null | string

Parses the game code to extract the cross-region portion.

Parameters

NameTypeDescription
gameGameUS | GameEU | GameJPThe game object returned from one of the other methods.
regionRegionRegion code

Returns

null | string

The 4-digit resulting game code

Defined in

lib/other/parseGameCode.ts:11


parseNSUID

β–Έ Const parseNSUID(game, region): null | string

Extracts NSUID information from the game object.

Parameters

NameTypeDescription
gameGameUS | GameEU | GameJPThe game object returned from one of the other methods.
regionRegionRegion code

Returns

null | string

The 14-digits NSUID

Defined in

lib/other/parseNSUID.ts:11