Stream API
The Stream Service is a component at the service layer of the BDK which aims to cover the Streams part of the REST API documentation. More precisely:
- Get stream information
- Add a member to an existing room
- Remove a member from a room
- Share third-party content
- Promote user to room owner
- Demote owner to room participant
- Create IM or MIM
- Create IM or MIM non-inclusive
- Create room
- Search for rooms
- Get room information
- Deactivate or reactivate a room
- Update a room
- List streams
- List user streams
- List stream members
- List room members
How to use
The central component for the Message API is the StreamService
class. This class exposes the user-friendly service APIs which serve all the services mentioned above and is accessible from the SymphonyBdk
object by calling the streams()
method:
@Slf4j
public class Example {
public static final String STREAM_ID = "MY_STRING_UD";
public static void main(String[] args) throws Exception {
// Create BDK entry point
final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));
// Get stream details
StreamService streams = bdk.streams();
V2StreamAttributes stream = streams.getStream(STREAM_ID);
log.info("Stream details: " + stream);
}
}