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.

  • 2.1.0
  • Source
  • npm
  • Socket score

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

logo

nintendo-switch-eshop

A Node.JS lib written to extract Nintendo Switch's eShop game and pricing information

DepfuLicenseNode VersionBuild Status

NPM bundle size (minified)NPM bundle size (minified + gzip)NPM VersionNPM Weekly DownloadsNPM Total Downloads


Installation

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:


Classes

EshopError

Functions

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.

Typedefs

Category : Category
GameEU : GameEU
GameUS : GameUS
GameJP : GameJP
EShop : EShop
PriceResponse : PriceResponse
TitleData : TitleData
PriceError : PriceError
PriceData : PriceData
RequestOptions : RequestOptions
USRequestOptions : USRequestOptions
EURequestOptions : EURequestOptions

EshopError

Kind: global class

new EshopError(message)

Create an EshopError

ParamTypeDescription
messagestring

The message the error should show

Region : enum

Predefined options for the unit system

Kind: global enum
Properties

NameType
1Region.AMERICAS
2Region.EUROPE
3Region.ASIA

getGamesAmerica([options], [offset], [games]) ⇒ 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>> -

ParamTypeDescription
[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

getGamesJapan() ⇒ Promise<Array<GameJP>>

Fetches all games on japanese eShops

Kind: global function
Returns: Promise<Array<GameJP>> -

getGamesEurope([options]) ⇒ Promise<Array<GameUS>>

Fetches all games on european eShops

Kind: global function
Returns: Promise<Array<GameUS>> -

ParamTypeDescription
[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> -

ParamTypeDescription
countrystring

A two digit country code. (ISO 3166-1 alpha-2 country code)

gameIdsArray<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

getShopsByCountryCodes(countryCodes, gameCode, region) ⇒ Promise<Array<EShop>>

Gets all active eShops given a list of countries.

Kind: global function
Returns: Promise<Array<EShop>> -

ParamTypeDescription
countryCodesArray<string>

A list of 2 digit country codes for every country eShop to lookup. (ISO 3166-1 alpha-2 country codes)

gameCodestring

A 14 digits game NSUID from the desired region.

regionRegion

A region id that will be appended 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>> -

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.

Kind: global function
Returns: Promise<Array<EShop>> -

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>> -

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>> -

parseGameCode(game, region) ⇒ string | null

Parses the game code to extract the cross-region protion.

Kind: global function
Returns: string | null -

ParamTypeDescription
gameGameUS | GameEU | GameJP

The game object returned from one of the other methods.

regionRegion

Region code

parseNSUID(game, region) ⇒ string | null

Extracts NSUID information from the game object.

Kind: global function
Returns: string | null -

ParamTypeDescription
gameGameUS | GameEU | GameJP

The game object returned from one of the other methods.

regionRegion

Region code

Category : Category

Kind: global typedef
Properties

NameType
categoryArray<string>

GameEU : GameEU

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_h2x1_sstring
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>

GameUS : GameUS

Kind: global typedef
Properties

NameTypeDescription
game_codestring

Product code. Can be parsed for a region wide code.

buyonlineboolean
front_box_artstring
eshop_pricenumber

USA eShop price (in dollars)

nsuidstring

14-digit game unique identifier

video_linkstring
number_of_playersstring
ca_pricenumber

Canada eShop price (in canadian dollars)

idstring
titlestring
systemstring

Gaming platform

free_to_startboolean
digitaldownloadboolean
release_datestring
categoriesCategory
slugstring

Game URL name

buyitnowboolean

GameJP : GameJP

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 : EShop

Kind: global typedef
Properties

NameType
codestring
countrystring
currencystring
regionRegion

PriceResponse : PriceResponse

Kind: global typedef
Properties

NameType
errorPriceError
personalizedboolean
countrystring
pricesArray<TitleData>

TitleData : TitleData

Kind: global typedef
Properties

NameType
title_idnumber
sales_statusstring
regular_pricePriceData
[discount_price]PriceData

PriceError : PriceError

Kind: global typedef
Properties

NameType
codestring
messagestring

PriceData : PriceData

Kind: global typedef
Properties

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

RequestOptions : RequestOptions

Kind: global typedef
Properties

NameTypeDescription
limitnumber

Game count limit (Can only be lower than default page size)

USRequestOptions : USRequestOptions

Kind: global typedef
Extends: RequestOptions
Properties

NameTypeDescription
shop'retail' | 'ncom' | 'all'

Either 'retail' / 'ncom' / 'all'. Defaults to 'ncom'.

EURequestOptions : EURequestOptions

Kind: global typedef
Extends: RequestOptions
Properties

NameTypeDescription
localestring

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

Keywords

FAQs

Package last updated on 26 Feb 2019

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