Class: Builder

WTAPI.Presence.Builder() → {WTAPI.Presence.Builder}

new Builder() → {WTAPI.Presence.Builder}

Constructor for Presence builder.
Source:
Returns:
Type
WTAPI.Presence.Builder
Example
var untilDate = new Date((new Date()).getTime() + 1*60*60*1000); //current date +1 hour
var builder = new WTAPI.Presence.Builder();
builder.setAway();
builder.setStatusMessage(message);
builder.setStatusUntil(untilDate);
var presence = builder.build();
wtapi.presence.changePersonalPresence(presence, onChangePresenceCallback);

Methods

build() → {WTAPI.Presence}

Build the presence object.
Source:
Returns:
Type
WTAPI.Presence

setAway() → {WTAPI.Presence.Builder}

Set away status.
Source:
Returns:
Type
WTAPI.Presence.Builder

setConnectedCall(call) → {WTAPI.Presence.Builder}

Set connected call information.
Parameters:
Name Type Description
call WTAPI.ConnectedCall
Source:
Returns:
Type
WTAPI.Presence.Builder

setDND() → {WTAPI.Presence.Builder}

Set dnd status.
Source:
Returns:
Type
WTAPI.Presence.Builder

setLocation(location) → {WTAPI.Presence.Builder}

Set location.
Parameters:
Name Type Description
location WTAPI.Location
Source:
Returns:
Type
WTAPI.Presence.Builder

setMUR() → {WTAPI.Presence.Builder}

Set mur status.
Source:
Returns:
Type
WTAPI.Presence.Builder

setOnline() → {WTAPI.Presence.Builder}

Set online (available) status.
Source:
Returns:
Type
WTAPI.Presence.Builder

setProfileData(profileData) → {WTAPI.Presence.Builder}

Set profile data.
Parameters:
Name Type Description
profileData WTAPI.ProfileData
Source:
Returns:
Type
WTAPI.Presence.Builder

setStatusMessage(message) → {WTAPI.Presence.Builder}

Set message.
Parameters:
Name Type Description
message string
Source:
Returns:
Type
WTAPI.Presence.Builder

setStatusUntil(date) → {WTAPI.Presence.Builder}

Set until.
Parameters:
Name Type Description
date Date
Source:
Returns:
Type
WTAPI.Presence.Builder