Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Getting people from a group in contacts api
-
Hi, I’m trying to get a list of people from a group.
def test_get_contacts_from_group_name(): groupName = "Mail List Test" groups = contacts.get_all_groups() for group in groups: if (groupName == group.name): members_group = contacts.get_group(group.id) print(members_group) members_group.get_all_people() #for member in members_group: # print (member.address) else: print('-1')
Group does not have a member called get_all_members. Are there away to get members from a group?
Thanks
-
I figured it out...
There is a method on group called get_all_members. I must have missed in when reviewing the docs.
-
@wjshea, i was doing something with contacts yesterday. I found just doing print(help(contacts)) was very useful.