nintendo-switch-eshop
Advanced tools
Comparing version 2.2.7 to 2.2.8
@@ -5,2 +5,4 @@ # Changelog | ||
### [2.2.8](https://github.com/lmmfranco/nintendo-switch-eshop/compare/v2.2.7...v2.2.8) (2019-12-20) | ||
### [2.2.7](https://github.com/lmmfranco/nintendo-switch-eshop/compare/v2.2.6...v2.2.7) (2019-12-10) | ||
@@ -7,0 +9,0 @@ |
@@ -58,4 +58,4 @@ import { Country } from 'country-data'; | ||
export interface GameUS { | ||
/** Product code. Can be parsed for a region wide code. */ | ||
game_code: string; | ||
/** @deprecated Product code. Can be parsed for a region wide code. */ | ||
game_code?: string; | ||
buyonline: boolean; | ||
@@ -62,0 +62,0 @@ front_box_art: string; |
@@ -92,3 +92,3 @@ import * as interfaces from './interfaces'; | ||
*/ | ||
export declare const parseGameCode: (game: interfaces.GameUS | interfaces.GameJP | interfaces.GameEU, region: interfaces.Region) => string | null; | ||
export declare const parseGameCode: (game: interfaces.GameEU | interfaces.GameUS | interfaces.GameJP, region: interfaces.Region) => string | null; | ||
/** | ||
@@ -101,3 +101,3 @@ * Extracts NSUID information from the game object. | ||
*/ | ||
export declare const parseNSUID: (game: interfaces.GameUS | interfaces.GameJP | interfaces.GameEU, region: interfaces.Region) => string | null; | ||
export declare const parseNSUID: (game: interfaces.GameEU | interfaces.GameUS | interfaces.GameJP, region: interfaces.Region) => string | null; | ||
//# sourceMappingURL=nintendo-switch-eshop.d.ts.map |
@@ -8,2 +8,3 @@ "use strict"; | ||
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch")); | ||
const util_1 = require("util"); | ||
const constants = tslib_1.__importStar(require("./constants")); | ||
@@ -388,3 +389,8 @@ const interfaces = tslib_1.__importStar(require("./interfaces")); | ||
case interfaces.Region.AMERICAS: | ||
codeParse = constants.US_GAME_CODE_REGEX.exec(game.game_code); | ||
return util_1.deprecate(() => { | ||
var _a; | ||
return (((_a = constants.US_GAME_CODE_REGEX.exec(game.game_code)) === null || _a === void 0 ? void 0 : _a.length) || false | ||
? constants.US_GAME_CODE_REGEX.exec(game.game_code)[1] | ||
: ''); | ||
}, 'game_code is no longer returned by the API for American games so it can no longer be parsed from the data.', 'DEP0001')(); | ||
} | ||
@@ -391,0 +397,0 @@ return (codeParse && codeParse.length > 1) ? codeParse[1] : null; |
{ | ||
"name": "nintendo-switch-eshop", | ||
"version": "2.2.7", | ||
"version": "2.2.8", | ||
"description": "Unofficial API lib for Nintendo Switch eShop game listing and pricing information.", | ||
@@ -5,0 +5,0 @@ "author": "lmmfranco", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
74061
876