Response Class

Constructors

  • Constructor

    Parameters

    • raw: string

      API plain response

    • cmd: any = {}

      API command used within this request

    • ph: any = {}

      placeholder array to get vars in response description dynamically replaced

    Returns Response

Properties

hash: any

hash representation of plain API response

raw: string

plain API response

Methods

  • Add a column to the column list

    Parameters

    • key: string

      column name

    • data: string[]

      array of column data

    Returns Response

    Current Response Instance for method chaining

  • Add a record to the record list

    Parameters

    • h: any

      row hash data

    Returns Response

    Current Response Instance for method chaining

  • Get API response code

    Returns number

    API response code

  • Get column by column name

    Parameters

    • key: string

      column name

    Returns null | Column

    column instance or null if column does not exist

  • Get Data by Column Name and Index

    Parameters

    • colkey: string

      column name

    • index: number

      column data index

    Returns null | string

    column data at index or null if not found

  • Get Column Names

    Returns string[]

    Array of Column Names

  • Get Command used in this request

    Returns any

    command

  • Get Command used in this request in plain text format

    Returns string

    command as plain text

  • Get Page Number of current List Query

    Returns null | number

    page number or null in case of a non-list response

  • Get Record of current record index

    Returns null | Record

    Record or null in case of a non-list response

  • Get API response description

    Returns string

    API response description

  • Get Index of first row in this response

    Returns null | number

    first row index

  • Get API response as Hash

    Returns any

    API response hash

  • Get last record index of the current list query

    Returns null | number

    record index or null for a non-list response

  • Get Response as List Hash including useful meta data for tables

    Returns any

    hash including list meta data and array of rows in hash notation

  • Get Page Number of next list query

    Returns null | number

    page number or null if there's no next page

  • Get next record in record list

    Returns null | Record

    Record or null in case there's no further record

  • Get the number of pages available for this list query

    Returns number

    number of pages

  • Get object containing all paging data

    Returns any

    paginator data

  • Get Plain API response

    Returns string

    Plain API response

  • Get Page Number of previous list query

    Returns null | number

    page number or null if there's no previous page

  • Get previous record in record list

    Returns null | Record

    Record or null if there's no previous record

  • Get Queuetime of API response

    Returns number

    Queuetime of API response

  • Get Record at given index

    Parameters

    • idx: number

      record index

    Returns null | Record

    Record or null if index does not exist

  • Get count of rows in this response

    Returns number

    count of rows

  • Get limit(ation) setting of the current list query This is the count of requested rows

    Returns number

    limit setting or count requested rows

  • Get total count of records available for the list query

    Returns number

    total count of records or count of records for a non-list response

  • Get Runtime of API response

    Returns number

    Runtime of API response

  • Check if this list query has a next page

    Returns boolean

    boolean result

  • Check if this list query has a previous page

    Returns boolean

    boolean result

  • Check if current API response represents an error case API response code is an 5xx code

    Returns boolean

    boolean result

  • Check if current operation is returned as pending

    Returns boolean

    boolean result

  • Check if current API response represents a success case API response code is an 2xx code

    Returns boolean

    boolean result

  • Check if current API response represents a temporary error case API response code is an 4xx code

    Returns boolean

    boolean result

  • Reset index in record list back to zero

    Returns Response

    Current Response Instance for method chaining