nintendo-switch-eshop
Enumerations
Classes
Interfaces
- EShop
- EURequestOptions
- GameEU
- GameJP
- GameUS
- HighlightResult
- Nsuid
- PriceResponse
- QueriedGameResult
- QueriedGameUS
- QueriedGamesAmericaOptions
- TitleData
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
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
PRICE_GET_URL
β’ PRICE_GET_URL: "https://api.ec.nintendo.com/v1/price"
URL for getting game prices
Defined in
QUERIED_US_ALGOLIA_KEY
β’ QUERIED_US_ALGOLIA_KEY: "6efbfb0f8f80defc44895018caf77504"
Algolia key for getting US games with a query
Defined in
QUERIED_US_GET_GAMES_URL
β’ QUERIED_US_GET_GAMES_URL: string
URL for getting Queried US Games
Defined in
US_ALGOLIA_HEADERS
β’ US_ALGOLIA_HEADERS: Object
internal
Request headers for US games
Type declaration
Name | Type |
---|---|
Content-Type | string |
X-Algolia-API-Key | string |
X-Algolia-Application-Id | string |
Defined in
US_ALGOLIA_ID
β’ US_ALGOLIA_ID: "U3B6GR4UA3"
Algolia ID for getting US games
Defined in
US_ALGOLIA_KEY
β’ US_ALGOLIA_KEY: "c4da8be7fd29f0f5bfa42920b0a99dc7"
Algolia Key for getting US games
Defined in
US_GET_GAMES_URL
β’ US_GET_GAMES_URL: string
URL for getting US Games
Defined in
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
Name | Type | Description |
---|---|---|
options | EURequestOptions | Request 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
Name | Type | Default value | Description |
---|---|---|---|
country | string | undefined | A two digit country code. (ISO 3166-1 alpha-2 country code) |
gameIds | string | string [] | undefined | One or more NSUID of the corresponding games. |
offset | number | 0 | (Optional) The offset to start at |
prices | TitleData [] | [] | (Optional) An array of TitleData |
Returns
Promise
<PriceResponse
>
A promise containing the pricing information.
Defined in
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
Name | Type | Description |
---|---|---|
query | string | The query to search for |
__namedParameters | QueriedGamesAmericaOptions | Additional 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
Name | Type | Description |
---|---|---|
countryCodes | string [] | A list of 2 digit country codes for every country eShop to lookup. (ISO 3166-1 alpha-2 country codes) |
gameCode | string | A 14 digits game NSUID from the desired region. |
region | Region | A 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
Name | Type | Description |
---|---|---|
game | GameUS | GameEU | GameJP | The game object returned from one of the other methods. |
region | Region | Region code |
Returns
null
| string
The 4-digit resulting game code
Defined in
parseNSUID
βΈ Const
parseNSUID(game
, region
): null
| string
Extracts NSUID information from the game object.
Parameters
Name | Type | Description |
---|---|---|
game | GameUS | GameEU | GameJP | The game object returned from one of the other methods. |
region | Region | Region code |
Returns
null
| string
The 14-digits NSUID