About
nintendo-switch-eshop is a npm lib module written to extract Nintendo Switch's eShop game and pricing information.
Installation
To install it just type the following at your command line
npm install --save nintendo-switch-eshop
And require it in your node module as follows:
const SwitchEshop = require('nintendo-switch-eshop');
Functions
- getGamesAmerica([options]) ⇒
Promise<Array<GameUS>>
Fetches all games on american eshops.
Paginates every 200 games. (maximum item count per request)
- getGamesJapan() ⇒
Promise<Array<GameJP>>
Fetches all games on japanese eshop.
- getGamesEurope([options]) ⇒
Promise<Array<GameEU>>
Fetches all games on european eshop.
Paginates every 9999 games. (maximum item count per request)
- getShopsByCountryCodes(countryCodes, gamecode, region) ⇒
Promise<Array<Eshop>>
Gets all active eshops given a list of countries.
- getShopsAmerica() ⇒
Promise<Array<Eshop>>
Gets all active eshops on american countries.
This method will launch several requests at nintendo web services, so don't abuse it.
- getShopsEurope() ⇒
Promise<Array<Eshop>>
Gets all active eshops on european countries.
Please note that South Africa and Oceania countries are included.
This method will launch several requests at nintendo web services, so don't abuse it.
- getShopsAsia() ⇒
Promise<Array<Eshop>>
Gets all active eshops on asian countries.
This method will launch several requests at nintendo web services, so don't abuse it.
- getActiveShops() ⇒
Promise<Array<Eshop>>
Gets all active eshops.
This method will launch several requests at nintendo web services, so don't abuse it.
- getPrices(country, gameIds) ⇒
Promise<PriceResponse>
Get pricing information for the requested games. Paginates every 50 games.
- parseGameCode(game, region) ⇒
string
Parses the game code to extract the cross-region protion.
- parseNSUID(game, region) ⇒
string
Extracts NSUID information from the game object.
Typedefs
- Categories :
Object
- GameUS :
Object
- GameEU :
Object
- GameJP :
Object
- EShop :
Object
- PriceResponse :
Object
- TitleData :
Object
- PriceError :
Object
- PriceData :
Object
- RequestOptions :
Object
Region : enum
Region code constant.
Kind: global enum
Read only: true
Properties
Name | Type | Default |
---|
AMERICAS | number | 1 |
EUROPE | number | 2 |
ASIA | number | 3 |
getGamesAmerica([options]) ⇒ Promise<Array<GameUS>>
Fetches all games on american eshops.
Paginates every 200 games. (maximum item count per request)
Kind: global function
Returns: Promise<Array<GameUS>>
- Promise containing all the games.
getGamesJapan() ⇒ Promise<Array<GameJP>>
Fetches all games on japanese eshop.
Kind: global function
Returns: Promise<Array<GameJP>>
- Promise containing all the games.
getGamesEurope([options]) ⇒ Promise<Array<GameEU>>
Fetches all games on european eshop.
Paginates every 9999 games. (maximum item count per request)
Kind: global function
Returns: Promise<Array<GameEU>>
- Promise containing all the games.
getShopsByCountryCodes(countryCodes, gamecode, region) ⇒ Promise<Array<Eshop>>
Gets all active eshops given a list of countries.
Kind: global function
Returns: Promise<Array<Eshop>>
- A list of shop objects with country code, name and default currency.
Param | Type | Description |
---|
countryCodes | Array<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 | number | A region id that will be appendend in the final shop object for filtering purposes. |
getShopsAmerica() ⇒ Promise<Array<Eshop>>
Gets all active eshops on american countries.
This method will launch several requests at nintendo web services, so don't abuse it.
Kind: global function
Returns: Promise<Array<Eshop>>
- A list of shop objects with country code, name and default currency.
getShopsEurope() ⇒ Promise<Array<Eshop>>
Gets all active eshops on european countries.
Please note that South Africa and Oceania countries are included.
This method will launch several requests at nintendo web services, so don't abuse it.
Kind: global function
Returns: Promise<Array<Eshop>>
- A list of shop objects with country code, name and default currency.
getShopsAsia() ⇒ Promise<Array<Eshop>>
Gets all active eshops on asian countries.
This method will launch several requests at nintendo web services, so don't abuse it.
Kind: global function
Returns: Promise<Array<Eshop>>
- A list of shop objects with country code, name and default currency.
getActiveShops() ⇒ Promise<Array<Eshop>>
Gets all active eshops.
This method will launch several requests at nintendo web services, so don't abuse it.
Kind: global function
Returns: Promise<Array<Eshop>>
- A list of shop objects with country code, name and default currency.
Get pricing information for the requested games. Paginates every 50 games.
Kind: global function
Returns: Promise<PriceResponse>
- A promise containing the pricing information.
Param | Type | Description |
---|
country | string | A two digit country code. (ISO 3166-1 alpha-2 country code) |
gameIds | Array<string> | string | One or more NSUID of the corresponding games. |
parseGameCode(game, region) ⇒ string
Parses the game code to extract the cross-region protion.
Kind: global function
Returns: string
- The 4-digit resulting game code.
Param | Type | Description |
---|
game | GameUS | GameEU | GameJP | The game object returned from one of the other methods. |
region | number | Region code. (use the Region constant) |
parseNSUID(game, region) ⇒ string
Extracts NSUID information from the game object.
Kind: global function
Returns: string
- The 14-digit NSUID.
Param | Type | Description |
---|
game | GameUS | GameEU | GameJP | The game object returned from one of the other methods. |
region | number | Region code. (use the Region constant) |
Categories : Object
Kind: global typedef
Properties
Name | Type |
---|
category | Array<string> |
GameUS : Object
Kind: global typedef
Properties
Name | Type | Description |
---|
game_code | string | Product code. Can be parsed for a region wide code. |
buyonline | boolean | |
front_box_art | string | |
eshop_price | number | USA eShop price (in dollars) |
nsuid | string | 14-digit game unique identifier |
video_link | string | |
number_of_players | string | |
ca_price | number | Canada eShop price (in canadian dollars) |
id | string | |
title | string | |
system | string | Gaming platform |
free_to_start | boolean | |
digitaldownload | boolean | |
release_date | string | |
categories | Categories | |
slug | string | Game URL name |
buyitnow | boolean | |
GameEU : Object
Kind: global typedef
Properties
Name | Type | Description |
---|
age_rating_type | string | |
age_rating_value | string | |
copyright_s | string | |
developer | string | |
excerpt | string | |
fs_id | string | |
game_series_t | string | |
gift_finder_carousel_image_url_s | string | |
gift_finder_description_s | string | |
gift_finder_detail_page_image_url_s | string | |
gift_finder_detail_page_store_link_s | string | |
gift_finder_wishlist_image_url_s | string | |
image_url | string | |
image_url_sq_s | string | |
image_url_tm_s | string | |
originally_for_t | string | |
pretty_agerating_s | string | |
pretty_date_s | string | |
publisher | string | |
sorting_title | string | |
title | string | |
type | string | |
url | string | |
add_on_content_b | boolean | |
club_nintendo | boolean | |
near_field_comm_b | boolean | |
physical_version_b | boolean | |
play_mode_handheld_mode_b | boolean | |
play_mode_tabletop_mode_b | boolean | |
play_mode_tv_mode_b | boolean | |
change_date | Date | |
date_from | Date | |
priority | Date | |
age_rating_sorting_i | number | |
players_from | number | |
players_to | number | |
compatible_controller | Array<string> | |
game_categories_txt | Array<string> | |
game_category | Array<string> | |
language_availability | Array<string> | |
nsuid_txt | Array<string> | Array containing the 14-digit game unique identifier |
playable_on_txt | Array<string> | |
product_code_txt | Array<string> | Array containing the product code |
system_names_txt | Array<string> | |
system_type | Array<string> | |
title_extras_txt | Array<string> | |
GameJP : Object
Kind: global typedef
Properties
Name | Type | Description |
---|
LinkURL | Array<string> | A single item array containing the game url |
LinkTarget | Array<string> | |
ScreenshotImgURL | Array<string> | A single item array containing the game thumbnail url |
ScreenshotImgURLComing | Array<string> | |
TitleName | Array<string> | A single item array containing the game title |
TitleNameRuby | Array<string> | |
SoftType | Array<string> | |
SalesDate | Array<string> | |
SalesDateStr | Array<string> | |
MakerName | Array<string> | |
Hard | Array<string> | |
Memo | Array<string> | |
EShop : Object
Kind: global typedef
Properties
Name | Type |
---|
code | string |
country | string |
currency | string |
region | Region |
PriceResponse : Object
Kind: global typedef
Properties
TitleData : Object
Kind: global typedef
Properties
PriceError : Object
Kind: global typedef
Properties
Name | Type |
---|
code | string |
message | string |
PriceData : Object
Kind: global typedef
Properties
Name | Type |
---|
amount | string |
currency | string |
raw_value | string |
RequestOptions : Object
Kind: global typedef
Properties
Name | Type | Description |
---|
locale | string | Game information locale. (EU Only) |
limit | number | Game count limit (Can only be lower than default page size) |
shop | string | Either `'retail' |