bulger@baeri.org writes:
I'm trying to return all the memberships for members with email addresses that match a given string. The equivalent of 'mailman findmember jo', which returns 'john@example.com' and lists, 'joe@example.com' and lists, etc.
What I'm doing now is finding users with a string match, then for each user getting their addresses,
This is going to give addresses that do not match the query string. Is that what you want?
and then for each address getting memberships. Is there anything more direct?
If you want the original spec according to your example (the address matches the query string), I think there is an 'addresses' endpoint, and your best bet (definitely most flexible) is to get them all and filter in the script.
If you want all subscriptions of each user with a matching address regardless of the subscription address, then you must get the list of users, and then there's probably an endpoint user/$USERID/member (can't vouch for the spelling), and you'll have to iterate over that.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan