I use the Google API to receive events and contacts on the user's calendar.
When extracting contacts, I get the answer as follows: -
[ { 'phones': [], 'image_path': '', 'id': 'ID', 'emails': ['email1'], 'name': ABC }, { 'phones': [], 'image_path': '', 'id': 'ID', 'emails': ['email2'], 'name': DEF } ]
When I receive events, I get the following response: -
[ { 'attendees': [{ 'organizer': True, 'displayName': 'ABC', 'id': 'Google+ Id', 'responseStatus': 'accepted' }, { 'self': True, 'displayName': 'DEF', 'id': 'Google+ id', 'responseStatus': 'accepted' }], 'organizer': { 'displayName': 'ABC', 'id': 'Google+ id' }, 'creator': { 'displayName': 'ABC', 'id': 'Google+ id' }, }, { 'organizer': { 'self': True, 'displayName': 'DEF', 'email': 'email2' }, 'creator': { 'self': True, 'displayName': 'DEF', 'email': 'email2' }, } ]
As you can see, when retrieving events (from visitors, organizers, creators) I get a Google+ identifier in some cases and email_ids in other cases. This does not support uniformity in my code.
Since I dialed contacts with the user, and I'm looking for contacts through their email_ids. If I do not receive email_id among the participants, organizers or creators, I will not be able to refer to the contact object.
How can I make sure that I only receive visitors by email, not the Google+ ID.