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');
// ES6 Style: import { getGamesAmerica, getGamesEurope, getGamesJapan } from 'nintendo-switch-eshop';
// getGamesAmerica is also default exported: import getGamesAmerica from 'nintendo-switch-eshop';
For calling functions with the correct parameters and syntax please refer to the documentation below:
Options used for getting US gmaes
Algolia ID for getting US games
Algolia Key for getting US games
URL for getting US Games
Sample game code for US store
Regex for US game codes
Default limit for getting US games - Defaults to 200
Price ranges for US games
Options used for getting EU gmaes
URL for getting EU Games
Sample game code for EU store
Regex for EU game codes
Default locale when getting EU games - defaults to en
Default limit used when getting EU games - defaults to 9999
URL for getting currently released JP Games
URL for getting upcoming JP Games
Sample game code for JP store
Regex for JP game codes
Regex for JP NSUID
URL for getting game prices
Options for getting Price data
Default limit used when getting price data - defaults to 50
Class representing an error in the nintendo-switch-eshop library
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 |
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 |
This is the documentation for nintendo-switch-eshop. Documentation is generated by JSDoc and jsdoc-to-markdown.
Copyright © 2017
lmmfranco
[email protected]