Module: nationscript/requests/dump

Internal module providing request builder classes specialised for fetching Daily Data Dumps.

Classes

CardDumpRequest
DateDumpRequest
DumpRequest
NationDumpRequest
RegionDumpRequest

Members

(inner, constant) DumpMode :number

Supported ways of getting Daily Data Dump contents.

Type:
  • number
Properties:
Name Type Description
DOWNLOAD number

Download the Dump and read it. Makes one API request.

DOWNLOAD_IF_CHANGED number

Download the Dump only if it is newer than the local copy or a local copy doesn't exist. Whichever of the two is newer is read. Makes one API request.

LOCAL number

Read the local copy of the Dump. If none exists, the request fails. Makes no API requests.

LOCAL_OR_DOWNLOAD number

Read the local copy of the Dump; if none exists, download the Dump. If a download is initiated, one API request is made, otherwise none are.

REMOTE number

Read the Dump from the NS servers without creating a local copy. Makes one API request.

Type Definitions

DumpFactoryConstructor(decider) → {Factory.FactoryConstructor.<Array.<ProductType>>}

Parameters:
Name Type Description
decider Factory.FactoryDecider.<ProductType>
Returns:

DumpFactory constructor function bound to the provided decider function

Type
Factory.FactoryConstructor.<Array.<ProductType>>

FileNamerCard(season) → {string}

Parameters:
Name Type Description
season number

Season of the Dump

Returns:

Expected file name

Type
string

FileNamerNormal(date) → {string}

Parameters:
Name Type Description
date Date

Date of the Dump

Returns:

Expected file name

Type
string