Class: CardIndividualRequest

nationscript/requests/card~CardIndividualRequest()

Request subclass for building requests to the (individual) cards endpoint of the API (q=card).

Constructor

new CardIndividualRequest()

Additionally mandates the q, cardid, and season arguments and sets the q argument.

Methods

clearShards()

removeShards()

(async) send() → {Promise.<types.Card>}

Returns:
Type
Promise.<types.Card>

setCard(id, season) → {this}

Define the card to query with this request.

Parameters:
Name Type Description
id number

ID of the card to request

season number

Season the desired card was inscribed for

Returns:

The request, for chaining

Type
this

setTradesOptions(limit, from, to) → {this}

Define a time frame from which alone to return trades of the queried card as well as a maximum number of trades to return. Only affects requests containing the CardDetailShard.TRADES shard.

Parameters:
Name Type Description
limit number

Maximum number of trades to return. If not set, 50 trades are returned.

from number

Timestamp from which on to return trades

to number

Timestamp up to which to return trades

Returns:

The request, for chaining

Type
this

shard()