Options
All
  • Public
  • Public/Protected
  • All
Menu

Use this client to interface with Discoin and create transactions.

Hierarchy

  • Client

Index

Constructors

  • new Client(token: string, currencyIds: string[]): Client
  • 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 Client

Properties

commonQueries: CommonQueries

Common queries customized for your bot.

currencyIds: string[]
token: string
transactions: TransactionStore

Update and get transactions.

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

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

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

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<Currency[] | ApiGetManyDto<Currency>>

      An array of currencies that satisfy the query

  • getOne:function
    • Get one currency by ID.

      Parameters

      • code: string

        The currency code of the currency to get

      Returns Promise<Currency>

      The transaction

Generated using TypeDoc