Add the package through your package manager of choice:
npm install nintendo-switch-eshop
# yarn add nintendo-switch-eshop
Require your desired functions:
const { getGamesAmerica, getGamesEurope, getGamesJapan } = require('nintendo-switch-eshop');
// TypeScript / Babel: import { getGamesAmerica, getGamesEurope, getGamesJapan } from 'nintendo-switch-eshop';
For calling functions with the correct parameters and syntax please refer to the documentation below:
- getGamesAmerica([options], [offset], [games]) ⇒
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 eShops
- getGamesEurope([options]) ⇒
Promise<Array<GameUS>>
Fetches all games on european eShops
- getPrices(country, gameIds, [offset], [prices]) ⇒
Promise<PriceResponse>
Get pricing information for the requested games. Paginates every 50 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. 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.
- parseGameCode(game, region) ⇒
string
|null
Parses the game code to extract the cross-region protion.
- parseNSUID(game, region) ⇒
string
|null
Extracts NSUID information from the game object.
- Category :
Category
- GameEU :
GameEU
- GameUS :
GameUS
- GameJP :
GameJP
- EShop :
EShop
- PriceResponse :
PriceResponse
- TitleData :
TitleData
- PriceError :
PriceError
- PriceData :
PriceData
- RequestOptions :
RequestOptions
- USRequestOptions :
USRequestOptions
- EURequestOptions :
EURequestOptions
Create an EshopError
Param | Type | Description |
---|---|---|
message | string |
The message the error should show |
Predefined options for the unit system
Kind: global enum
Properties
Name | Type |
---|---|
1 | Region.AMERICAS |
2 | Region.EUROPE |
3 | Region.ASIA |
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
Param | Type | Description |
---|---|---|
[options] | USRequestOptions |
(Optional) Options for the request |
[offset] | number |
(Optional) Offset to start searching at |
[games] | Array<string> |
(Optional) Array of games to filter by |
Fetches all games on japanese eShops
Kind: global function
Returns: Promise<Array<GameJP>>
- Promise containing all the games
Fetches all games on european eShops
Kind: global function
Returns: Promise<Array<GameUS>>
- Promise containing all the games
Param | Type | Description |
---|---|---|
[options] | EURequestOptions |
(Optional) Options for the request |
getPrices(country, gameIds, [offset], [prices]) ⇒ Promise<PriceResponse>
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. |
[offset] | number |
(Optional) The offset to start at |
[prices] | Array<TitleData> |
(Optional) An array of TitleData |
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 | Region |
A region id that will be appended in the final shop object for filtering purposes. |
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.
Gets all active eShops on European 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.
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.
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.
Parses the game code to extract the cross-region protion.
Kind: global function
Returns: string
| null
- The 4-digit resulting game code
Param | Type | Description |
---|---|---|
game | GameUS | GameEU | GameJP |
The game object returned from one of the other methods. |
region | Region |
Region code |
Extracts NSUID information from the game object.
Kind: global function
Returns: string
| null
- The 14-digits NSUID
Param | Type | Description |
---|---|---|
game | GameUS | GameEU | GameJP |
The game object returned from one of the other methods. |
region | Region |
Region code |
Category : Category
Kind: global typedef
Properties
Name | Type |
---|---|
category | Array<string> |
GameEU : GameEU
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_h2x1_s | 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> |
GameUS : GameUS
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 | Category |
|
slug | string |
Game URL name |
buyitnow | boolean |
GameJP : GameJP
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 : EShop
Kind: global typedef
Properties
Name | Type |
---|---|
code | string |
country | string |
currency | string |
region | Region |
PriceResponse : PriceResponse
Kind: global typedef
Properties
Name | Type |
---|---|
error | PriceError |
personalized | boolean |
country | string |
prices | Array<TitleData> |
TitleData : TitleData
Kind: global typedef
Properties
Name | Type |
---|---|
title_id | number |
sales_status | string |
regular_price | PriceData |
[discount_price] | PriceData |
PriceError : PriceError
Kind: global typedef
Properties
Name | Type |
---|---|
code | string |
message | string |
PriceData : PriceData
Kind: global typedef
Properties
Name | Type |
---|---|
amount | string |
currency | string |
raw_value | string |
[start_datetime] | string |
[end_datetime] | string |
RequestOptions : RequestOptions
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
limit | number |
Game count limit (Can only be lower than default page size) |
USRequestOptions : USRequestOptions
Kind: global typedef
Extends: RequestOptions
Properties
Name | Type | Description |
---|---|---|
shop | 'retail' | 'ncom' | 'all' |
Either |
EURequestOptions : EURequestOptions
Kind: global typedef
Extends: RequestOptions
Properties
Name | Type | Description |
---|---|---|
locale | string |
Game information locale. (EU Only) |
This is the documentation for nintendo-switch-eshop. Documentation is generated by JSDoc and jsdoc-to-markdown.
Copyright © 2017
lmmfranco
lmmfranco@gmail.com