RTMResponse

RTMResponse

RTM Generic Response

This Class represents a generic Response from the RTM API Server. The RTMError and RTMSuccess Classes represent the actual failed and successful responses from the RTM API Server.

This Class is extended by the RTMSuccess and RTMError Classes.

Constructor

new RTMResponse(status)

Source:

Create a new Generic RTM Response with a status of either RTMResponse.STATUS_OK or RTMResponse.STATUS_FAIL.

Parameters:
Name Type Description
status string

RTM API Status

Members

(static) STATUS_FAIL :string

Source:
Default Value:
  • fail

RTM Status of 'fail' = error

Type:
  • string

(static) STATUS_OK :string

Source:
Default Value:
  • ok

RTM Status of 'ok' = successful

Type:
  • string

isOk :boolean

Source:

The success of the RTM Response (ie, is true when status is 'ok')

Type:
  • boolean

props :object

Source:

The RTM API properties of the Response

Type:
  • object

status :string

Source:

The RTM Response Status

Type:
  • string

Methods

has(property) → {boolean}

Source:

Check if the Response has the specified property

Parameters:
Name Type Description
property string

Property Name

Returns:
Type
boolean

toString() → {string}

Source:

Get a String representation of the Response

Returns:
Type
string