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() ⇒
Promise<Array<GameUS>>
Fetches all games on american eshops. Paginates every 200 games.
- getGamesJapan() ⇒
Promise<Array<GameJP>>
Fetches all games on japanese eshop. Paginates every 16 games.
- getGamesEurope() ⇒
Promise<Array<GameEU>>
Fetches all games on european eshop. Paginates every 9999 games.
- 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
- PriceError :
Object
- PriceData :
Object
- TitleData :
Object
- PriceResponse :
Object
Region : enum
Region code constant.
Read only: true
Properties
Name | Type | Default |
---|
AMERICAS | number | 1 |
EUROPE | number | 2 |
ASIA | number | 3 |
getGamesAmerica() ⇒ Promise<Array<GameUS>>
Fetches all games on american eshops. Paginates every 200 games.
Returns: Promise<Array<GameUS>>
- Promise containing all the games.
getGamesJapan() ⇒ Promise<Array<GameJP>>
Fetches all games on japanese eshop. Paginates every 16 games.
Returns: Promise<Array<GameJP>>
- Promise containing all the games.
getGamesEurope() ⇒ Promise<Array<GameEU>>
Fetches all games on european eshop. Paginates every 9999 games.
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.
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.
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.
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.
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.
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.
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.
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.
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
Properties
Name | Type |
---|
category | Array<string> |
GameUS : Object
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
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
Properties
Name | Type | Description |
---|
Row | Array<string> | |
TitleName | Array<string> | A single item array containing the game title |
LinkUrl | Array<string> | A single item array containing the game url |
Imgpath | Array<string> | A single item array containing the game thumbnail url |
ImgpathSp | Array<string> | A single item array containing the game cover art url |
Detail | Array<string> | A single item array containing the HTML markup for game details |
HardId | Array<string> | |
TrialFlg | Array<string> | |
TermType | Array<string> | |
MediaType | Array<string> | |
SoftType | Array<string> | |
EShop : Object
Properties
Name | Type |
---|
code | string |
country | string |
currency | string |
region | Region |
PriceError : Object
Properties
Name | Type |
---|
code | string |
message | string |
PriceData : Object
Properties
Name | Type |
---|
amount | string |
currency | string |
raw_value | string |
TitleData : Object
Properties
PriceResponse : Object
Properties