Presence API
The Presence Service is a component at the service layer of the BDK which covers the Presence part of the REST API documentation. More precisely:
- Get presence
- Get All Presence
- Get User Presence
- External Presence Interest
- Set Presence
- Create Presence Feed Deprecated
- Read Presence Feed Deprecated
- Delete Presence Feed Deprecated
- Set Other User’s Presence
How to use
The central component for the Presence Service is the PresenceService
class, it exposes the service APIs endpoints mentioned above. The service is accessible from theSymphonyBdk
object by calling the presences()
method:
@Slf4j
public class Example {
public static final Long USER_ID = 123456789L;
public static void main(String[] args) throws Exception {
// Create BDK entry point
final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));
// Get presence details
PresenceService presences = bdk.presences();
V2Presence userPresence = presences.getUserPresence(USER_ID, true);
log.info("User presence: " + userPresence);
}
}