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
- Update IM or MIM
- Get IM information
- 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
- List user streams (admin)
The central component for the Message Service 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:
class StreamMain:
@staticmethod
async def run():
stream_id_1 = "stream-id-1"
bdk_config = BdkConfigLoader.load_from_file("path/to/config.yaml")
async with SymphonyBdk(bdk_config) as bdk:
stream_service = bdk.streams()
stream = await stream_service.get_stream("stream_id")
if __name__ == "__main__":
asyncio.run(StreamMain.run())You can check more examples here