Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default

Use this client to interface with Discoin and create transactions.

Hierarchy

  • default

Index

Constructors

constructor

  • new default(token: string, currencyIDs: string[]): default
  • Create a Discoin client to interact with the Discoin API.

    Parameters

    • token: string

      The token to use for this client

    • currencyIDs: string[]

      The currency IDs that your bot uses

    Returns default

Properties

Readonly commonQueries

commonQueries: CommonQueries

Common queries customized for your bot.

currencyIDs

currencyIDs: string[]

token

token: string

Readonly transactions

transactions: TransactionStore

Update and get transactions.

Static Readonly bots

bots: { getMany: any; getOne: any } = ...

Get one or many bots from the Discoin network.

Type declaration

  • getMany: function
    • getMany(query?: string): Promise<APIGetManyDTO<Bot> | Bot[]>
    • Get several bot from the API by specifying a query.

      example

      client.getMany('filter=id||eq||388191157869477888');

      Parameters

      • Optional query: string

        The query for finding bots

      Returns Promise<APIGetManyDTO<Bot> | Bot[]>

      An array of bots that satisfy the query

  • getOne: function
    • getOne(id: string): Promise<Bot>
    • Get one bot by ID.

      Parameters

      • id: string

        The ID of the bot to get

      Returns Promise<Bot>

      The bot

Static Readonly currencies

currencies: { getMany: any; getOne: any } = ...

Get one or many currencies from the Discoin network.

Type declaration

  • getMany: function
    • Get several currencies from the API by specifying a query.

      example

      client.getMany('filter=value||$gte||0.4');

      Parameters

      • Optional query: string

        The query for finding currencies

      Returns Promise<APIGetManyDTO<Currency> | Currency[]>

      An array of currencies that satisfy the query

  • getOne: function
    • getOne(code: string): Promise<Currency>
    • Get one currency by ID.

      Parameters

      • code: string

        The currency code of the currency to get

      Returns Promise<Currency>

      The transaction

Generated using TypeDoc