new Builder() → {WTAPI.Presence.Builder}
Constructor for Presence builder.
Returns:
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.
Returns:
- Type
- WTAPI.Presence
setAway() → {WTAPI.Presence.Builder}
Set away status.
Returns:
setConnectedCall(call) → {WTAPI.Presence.Builder}
Set connected call information.
Parameters:
Name | Type | Description |
---|---|---|
call |
WTAPI.ConnectedCall |
Returns:
setDND() → {WTAPI.Presence.Builder}
Set dnd status.
Returns:
setLocation(location) → {WTAPI.Presence.Builder}
Set location.
Parameters:
Name | Type | Description |
---|---|---|
location |
WTAPI.Location |
Returns:
setMUR() → {WTAPI.Presence.Builder}
Set mur status.
Returns:
setOnline() → {WTAPI.Presence.Builder}
Set online (available) status.
Returns:
setProfileData(profileData) → {WTAPI.Presence.Builder}
Set profile data.
Parameters:
Name | Type | Description |
---|---|---|
profileData |
WTAPI.ProfileData |
Returns:
setStatusMessage(message) → {WTAPI.Presence.Builder}
Set message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string |
Returns:
setStatusUntil(date) → {WTAPI.Presence.Builder}
Set until.
Parameters:
Name | Type | Description |
---|---|---|
date |
Date |