Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Dynect

ashleybrener edited this page · 7 revisions
Clone this wiki locally

Class: Dynect

A Dynect API connector instance has the following methods, members, and events.

Dynect is an EventEmitter.

new Dynect(customer, username, password, [keepalive])

  • customer String. Dynect customer_name.
  • username String. Dynect user_name.
  • password String. Dynect pasword.
  • keepalive Number Optional. If specified, the API keep-alive interval in milliseconds.

Constructor for creating a new Dynect API connector instance.

connect()

Opens a new dynect Session.

disconnect()

Closes an existing Dynect Session.

publish(zone, [callback])

  • zone String.
  • callback Function Optional. The callback has argument (response), a Dynect Response object.

Publishes zone changes.

dynect.ARecord

A typed instance of Record for CRUD operations on A records.

  • rdata Object
    • address String. IPv4 Address.

dynect.CNAMERecord

A typed instance of Record for CRUD operations on CNAME records.

  • rdata Object
    • cname String. Hostname.

dynect.SRVRecord

A typed instance of Record for CRUD operations on SRV records.

  • rdata Object
    • port Number.
    • priority Number.
    • target String.
    • weight Number.

Event: 'connected'

  • token String. Dynect Session token.

Emitted when the Session is opened.

Event: 'disconnected'

Emitted when the Session is closed.

Event: 'enqueued'

  • task Object
    • method String. HTTP method.
    • path String. REST execution path.
    • token String. Dynect Session token.
    • data Object. Dynect request data object.

Emitted when an API call added to the queue.

Event: 'dequeued'

Emitted after an API call is popped from the queue and executed.

  • task Object
    • method String. HTTP method.
    • path String. REST execution path.
    • token String. Dynect Session token.
    • data Object. Dynect request data object.

Event: 'queueComplete'

Emitted when all calls in the queue have been completed.

Event: 'response'

  • task Object
    • method String. HTTP method.
    • path String. REST execution path.
    • token String. Dynect Session token.
    • data Object. Dynect request data object. *response Object. Dynect Response object.

Emitted when an API call response is received from Dynect.

Event: 'error'

  • task Object
    • method String. HTTP method.
    • path String. REST execution path.
    • token String. Dynect Session token.
    • data Object. Dynect request data object.
  • err String. Error details.

Emitted when an API call error occurs when making a request to Dynect.

Something went wrong with that request. Please try again.