Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Cannot iterate returned list of 'list_room_members(room_id: str)'

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.

  
  
Posted 11 months ago
Votes Newest

Answers


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)
  
  
Posted 11 months ago
Yong Sheng Tan
39 × 2 Administrator
3K Views
1 Answer
11 months ago
11 months ago
Tags