/ns-eshop-sale

An unofficial nodejs API for Nintendo Switch eShop on Sale.

Primary LanguageTypeScriptMIT LicenseMIT

ns-eshop-sale

npm version npm

ns-eshop-sale is a package written in Node.js that fetches Nintendo Switch's eShop Games on Sale.

Warning : The Nintendo API URL is not currently valid. This API is currently unavailable. link

Installation

npm install ns-eshop-sale

Usage

import { getSaleGames } from 'ns-eshop-sale';

(async () => {
  console.log(
    await getSaleGames({ country: 'KR', language: 'ko', count: 3, offset: 0 })
  );
})();

API

getSaleGames(apiParams: ApiParams): Promise<ApiResponse>

ApiParams

  country?: string;
  language?: string;
  count?: number;
  offset?: number;

ApiResponse

{
  contents: Content[];
  length: number;
  offset: number;
  total: number;
}

ApiResponse Sample

{
  "contents": [
    {
      "content_type": "title",
      "dominant_colors": [
        "ffffff",
        "000000",
        "ff0000"
      ],
      "formal_name": "다함께 쿠키요미3 -아버지가 아들에게-",
      "hero_banner_url": "https://img-eshop.cdn.nintendo.net/i/28210c027b859c248da8a4a17b1d4c7266f0dae81daeec151897ebfd2d2e4d0e.jpg",
      ...
      ...
    },
    ...
  ],
  "length": 10,
  "offset": 0,
  "total": 54
}

Known Issues

  • This API uses 'ec.nintendo.com' and available on the backend. (it has CORS issue on the client).

Samples using this api

Related