API Docs for:
Show:

User Class

Module: user

Abstraction of a user.

It can throw exceptions.

Constructor

User

(
  • uname
  • na
)
Object

Parameters:

  • uname String

    The username of the user

  • na String

    The name of the user

Returns:

Object:

The user object.

Methods

addEndpoint

(
  • type
  • id
  • data
)

Adds an endpoint. The function assumes that the specified endpoint type is valid. Otherwise it throws an exception.

It can throw an Exception.

Parameters:

  • type String

    The endpoint type

  • id String

    The endpoint identifier

  • data Object

    The object containing some information on endpoint to add

getAllEndpoints

() Object

Returns all endpoints of the user.

Returns:

Object:

All the user endpoints.

getAllEndpointsJSON

() Object

Returns all endpoints of the user in JSON format.

It can throw an Exception.

Returns:

Object:

All the user endpoints in JSON format.

getName

() String

Returns the name of the user.

Returns:

String:

The name

getPresence

() String

Get the presence status.

Returns:

String:

The presence status.

getPresenceCallforwardTo

(
  • destination
)

Get the destination of the "callforward" presence status.

Parameters:

  • destination String

    The destination number

getPresenceOnBusy

() Object

Get the conditional presence status on busy.

Returns:

Object:

The conditional presence status on busy.

getPresenceOnBusyCallforwardTo

(
  • dest
)

Return the destination of the "callforward" presence status on busy.

Parameters:

  • dest String

    The destination number of call forward on "busy"

getPresenceOnUnavailable

() Object

Get the conditional presence status on unavailable.

Returns:

Object:

The conditional presence status on unavailable.

getPresenceOnUnavailableCallforwardTo

(
  • dest
)

Return the destination of the "callforward" presence status on unavailable.

Parameters:

  • dest String

    The destination number of call forward on "unavailable"

getUsername

() String

Returns the username of the user.

Returns:

String:

The username

setCondPresenceCfUnavailable

(
  • dest
)

Set the conditional presence status for call forward on "unavailable".

Parameters:

  • dest String

    The destination number of call forward on "unavailable"

setPresence

(
  • status
)

Set the presence status.

Parameters:

  • status String

    The presence status

setPresenceCallforwardTo

(
  • destination
)

Set the destination of the "callforward" presence status.

Parameters:

  • destination String

    The destination number

setPresenceOnBusy

(
  • status
)

Set the presence status on busy.

Parameters:

  • status String

    The presence status on busy

setPresenceOnBusyCallforwardTo

(
  • dest
)

Set the destination of the "callforward" presence status on busy.

Parameters:

  • dest String

    The destination number of call forward on "busy"

setPresenceOnUnavailable

(
  • status
)

Set the presence status on unavailable.

Parameters:

  • status String

    The presence status on unavailable

setPresenceOnUnavailableCallforwardTo

(
  • dest
)

Set the destination of the "callforward" presence status on unavailable.

Parameters:

  • dest String

    The destination number of call forward on "unavailable"

toJSON

() Object

Returns the JSON representation of the user.

Returns:

Object:

The JSON representation of the user object.

toString

() String

Returns the readable string of the user.

Returns:

String:

The readable description of the user

Properties

endpoints

Unknown private

The endpoints of the user. The keys are the endpoint types and the values are objects that contains endpoint identifiers as keys and Endpoint objects as values.

name

String private

The name of the user.

presence

String private

The presence of the user.

presenceOnBusy

String private

The conditinoal presence of the user on busy.

presenceOnBusyCallforwardTo

String private

The destination number of the "callforward" presence status on busy.

Default: ""

presenceOnUnavailable

String private

The conditinoal presence of the user on unavailable.

presenceOnUnavailableCallforwardTo

String private

The destination number of the "callforward" presence status on unavailable.

Default: ""

username

String private

The username of the user.