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")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, 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 13 days 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 12 days ago
Yong Sheng Tan
10 × 1 Administrator
55 Views
1 Answer
13 days ago
12 days ago
Tags