AnchorQueryOptions

AnchorQueryOptions

Class where query parameters for Anchor API are defined.

Constructor

new AnchorQueryOptions(size, fromTimestamp, toTimestamp, cursor)

Creates an instance of AnchorQueryOptions.

Parameters:
Name Type Description
size number

Maximum number of data to query.

fromTimestamp number | string | Date

The starting date of the data to be queried.

toTimestamp number | string | Date

The ending date of the data to be queried.

cursor string

Information of the last retrieved cursor.

Members

size :number

Type:
  • number

fromTimestamp :Date

Type:
  • Date

toTimestamp :Date

Type:
  • Date

cursor :string

Type:
  • string

Methods

(static) constructFromObject(obj) → {AnchorQueryOptions}

Create an instance of AnchorQueryOptions from object.

Parameters:
Name Type Description
obj object

An object where query parameters are defined.

Returns:
Type
AnchorQueryOptions

isValidOptions(options) → {boolean}

Make sure that only essential ones are defined for the option values defined in AnchorQueryOptions.

Parameters:
Name Type Description
options Array.<string>

An array containing the names of options used in the function.

Returns:
Type
boolean