New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nintendo-switch-eshop

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nintendo-switch-eshop

Unofficial API lib for Nintendo Switch eShop game listing and pricing information.

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
74
decreased by-59.78%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version NPM downloads

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

NameTypeDefault
AMERICASnumber1
EUROPEnumber2
ASIAnumber3

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.

ParamTypeDescription
[options]RequestOptionsRequest options (Optional)

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.

ParamTypeDescription
[options]RequestOptionsRequest options (Optional)

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.

ParamTypeDescription
countryCodesArray<string>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.
regionnumberA 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.

getPrices(country, gameIds) ⇒ 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.

ParamTypeDescription
countrystringA two digit country code. (ISO 3166-1 alpha-2 country code)
gameIdsArray<string> | stringOne 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.

ParamTypeDescription
gameGameUS | GameEU | GameJPThe game object returned from one of the other methods.
regionnumberRegion 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.

ParamTypeDescription
gameGameUS | GameEU | GameJPThe game object returned from one of the other methods.
regionnumberRegion code. (use the Region constant)

Categories : Object

Kind: global typedef
Properties

NameType
categoryArray<string>

GameUS : Object

Kind: global typedef
Properties

NameTypeDescription
game_codestringProduct code. Can be parsed for a region wide code.
buyonlineboolean
front_box_artstring
eshop_pricenumberUSA eShop price (in dollars)
nsuidstring14-digit game unique identifier
video_linkstring
number_of_playersstring
ca_pricenumberCanada eShop price (in canadian dollars)
idstring
titlestring
systemstringGaming platform
free_to_startboolean
digitaldownloadboolean
release_datestring
categoriesCategories
slugstringGame URL name
buyitnowboolean

GameEU : Object

Kind: global typedef
Properties

NameTypeDescription
age_rating_typestring
age_rating_valuestring
copyright_sstring
developerstring
excerptstring
fs_idstring
game_series_tstring
gift_finder_carousel_image_url_sstring
gift_finder_description_sstring
gift_finder_detail_page_image_url_sstring
gift_finder_detail_page_store_link_sstring
gift_finder_wishlist_image_url_sstring
image_urlstring
image_url_sq_sstring
image_url_tm_sstring
originally_for_tstring
pretty_agerating_sstring
pretty_date_sstring
publisherstring
sorting_titlestring
titlestring
typestring
urlstring
add_on_content_bboolean
club_nintendoboolean
near_field_comm_bboolean
physical_version_bboolean
play_mode_handheld_mode_bboolean
play_mode_tabletop_mode_bboolean
play_mode_tv_mode_bboolean
change_dateDate
date_fromDate
priorityDate
age_rating_sorting_inumber
players_fromnumber
players_tonumber
compatible_controllerArray<string>
game_categories_txtArray<string>
game_categoryArray<string>
language_availabilityArray<string>
nsuid_txtArray<string>Array containing the 14-digit game unique identifier
playable_on_txtArray<string>
product_code_txtArray<string>Array containing the product code
system_names_txtArray<string>
system_typeArray<string>
title_extras_txtArray<string>

GameJP : Object

Kind: global typedef
Properties

NameTypeDescription
LinkURLArray<string>A single item array containing the game url
LinkTargetArray<string>
ScreenshotImgURLArray<string>A single item array containing the game thumbnail url
ScreenshotImgURLComingArray<string>
TitleNameArray<string>A single item array containing the game title
TitleNameRubyArray<string>
SoftTypeArray<string>
SalesDateArray<string>
SalesDateStrArray<string>
MakerNameArray<string>
HardArray<string>
MemoArray<string>

EShop : Object

Kind: global typedef
Properties

NameType
codestring
countrystring
currencystring
regionRegion

PriceResponse : Object

Kind: global typedef
Properties

NameType
errorPriceError
personalizedboolean
countrystring
pricesArray<TitleData>

TitleData : Object

Kind: global typedef
Properties

NameType
title_idnumber
sales_statusstring
regular_priceArray<PriceData>
[discount_price]Array<PriceData>

PriceError : Object

Kind: global typedef
Properties

NameType
codestring
messagestring

PriceData : Object

Kind: global typedef
Properties

NameType
amountstring
currencystring
raw_valuestring
[start_datetime]string
[end_datetime]string

RequestOptions : Object

Kind: global typedef
Properties

NameTypeDescription
localestringGame information locale. (EU Only)
limitnumberGame count limit (Can only be lower than default page size)
shopstringEither 'retail' / 'ncom' / 'all'. Defaults to 'ncom'. (US Only)

Keywords

FAQs

Package last updated on 20 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc