Constructor
new CardWorldRequest()
Additionally mandate
s the q
argument and
sets it.
Methods
clearShards()
removeShards()
(async) send() → {Promise.<types.CardWorld>}
Returns:
- Type
- Promise.<types.CardWorld>
setCollectionID(id) → {this}
Set the ID of the card collection to query the details of. Only affects
requests containing the CardShard.COLLECTION_DETAILS
shard.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | ID of the collection to view |
Returns:
The request, for chaining
- Type
- this
setNationID(id) → {this}
Set the nation to query card data for by its ID. Only affects requests
containing the CardShard.CARDS
, CardShard.SUMMARY
,
CardShard.ASKS_BIDS
, or CardShard.COLLECTIONS
shards.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | Database ID of the desired nation |
Returns:
The request, for chaining
- Type
- this
setNationName(name) → {this}
Set the nation to query card data for by its name. Only affects requests
containing the CardShard.CARDS
, CardShard.SUMMARY
,
CardShard.ASKS_BIDS
, or CardShard.COLLECTIONS
shards.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the desired nation |
Returns:
The request, for chaining
- Type
- this
setTradesOptions(limit, from, to) → {this}
Define a time frame from which alone to return trades as well as a
maximum number of trades to return. Only affects requests containing the
CardShard.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