Class: GiftCardCommand

nationscript/requests/command~GiftCardCommand()

Request subclass for building requests to the commands endpoint of the API, specifically for executing the c=giftcard nation private command.

Constructor

new GiftCardCommand()

Additionally mandates the cardid, to, and season arguments and sets the c argument.

Methods

setCard(id, season) → {this}

Define the trading card to send by its card ID and season.

Parameters:
Name Type Description
id number

ID of the card to send

season number

Season ID of the card

Returns:

The command, for chaining

Type
this

setRecipient(name) → {this}

Define the nation that should receive the trading card.

Parameters:
Name Type Description
name string

Name of the recipient

Returns:

The command, for chaining

Type
this