I am very new to the Google API so please excuse my ignorance...
It looks like Groups created for a domain don't populate as contacts
for users :-/
My workaround is to use the API to populate my users' contact lists
with those groups.
I have the DOT NET API installed and running in Visual Studio
SO the assumption is that at some later date I'll need to update these
Group contacts, whether it be deleting old, adding new or modifying
existing, so I thought it might be easiest to just purge them all and
re-import the current list of contacts.
The purge is done based on a match on specific text in the contact's
Content data, referenced below as varStringToFind.
I am running the following code to purge my Group contacts before I
start re-adding the current Group contacts:
Dim rs As New RequestSettings("DOMAIN.com", "USERID", "PASSWORD")
rs.AutoPaging = True
Dim cr As New ContactsRequest(rs)
Dim f As Feed(Of Contact) = cr.GetContacts()
For Each x As Contact In f.Entries
If Strings.InStr(x.Content, varStringToFind) > 0 Then
cr.Delete(x)
End If
Next
However, I'm finding that it's not purging them all, so I end up with
duplicates after adding in all my contacts again.
I wonder if this is some kind of timing issue, or maybe the act of
deleting a contact makes the other records to move up, causing a skip
as it iterates through the recordset.
Can anyone shed any light on this?
I suspect there is a better/faster way to do what I'm doing, but for
the life of me I don't know what it would be.
Thanks for any help.
Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---