MembershipList
is an object. The actual list is in a field named value
.
members = await bdk.streams().list_room_members(stream_id)
for member in members.value:
print(member.id)
Here is my code to get room members
async with SymphonyBdk(config) as bdk:
streams = bdk.streams()
members = await streams.list_room_members("<stream_id>")
for i in members:
logging.debug(i)
But I got this error message when iterate the returned list:
symphony.bdk.gen.exceptions.ApiAttributeError: MembershipList has no attribute '0' at ['['received_data']']
Thank you in advance for any help.
MembershipList
is an object. The actual list is in a field named value
.
members = await bdk.streams().list_room_members(stream_id)
for member in members.value:
print(member.id)