sgamel
Nov 03, 2018 - 11:15
Hi,
I’m trying to use the add_group function in Pythonista.
I create a group object, set a name and call save.
Seems that save fails with error, but I see no details in the console.
Anything that I missed ?
Here is my code:
import contacts
print('Groups {0.name!r}'.format(groupNames))
allowed = contacts.is_authorized()
print('Access to contacts allowed: {!r}'.format(allowed))
group = contacts.Group()
group.name = 'testing'
print('Group {!r} - id: {!r}'.format(group.name, group.id))
state = contacts.add_group(group)
print('add group response: {!r}'.format(state))
state = contacts.save()
print('save response: {!r}'.format(state))
print('Group {!r} - id: {!r}'.format(group.name, group.id))