Hi Julian,

Thank you for your help.  Your recommendation is working!  I do not
see the deleted contact in the auto-completion.

I am still not very clear on the different contact APIs (contact,
profile, and shared contact).  Can you clarify for each APIs for
domain users, non-domain users, and apps group?  Which APIs should be
used to add more extended properties for the contact?

Regards,
Sting

On Jul 22, 3:24 am, "Julian (Google)" <[email protected]> wrote:
> Hi,
>
> The easiest way to delete a contact is to use the delete method from
> the ContactEntry itself: contactEntry.delete()
>
> However, in your case, when using the sevice directly you need to
> specify the ETag to match the stored entry: contactsService.delete
> (resourceUri, etag)
>
> Cheers,
> Julian.
>
> On Jul 22, 2:49 am, sting1999 <[email protected]> wrote:
>
> > Hi Julian,
>
> > For the ContactService.delete() operation, I have tried all the
> > different URL values, such as the following:
> > 1) <id> value, 
> > e.g.http://www.google.com/m8/feeds/contacts/{MY_DOMAIN}/base/19a72320f4e0e64
> > 2) edit link value, 
> > e.g.http://www.google.com/m8/feeds/contacts/{MY_DOMAIN}/full/19a72320f4e0e64/1247610287731000
>
> > Using the id value give me this error:
> > com.google.gdata.util.ServiceForbiddenException: Forbidden
> > If-Match or If-None-Match header required
>
> > Uisng the edit link give me this error:
> > com.google.gdata.util.InvalidEntryException: Bad Request
> > Unexpected resource version ID
>
> > It seems like the id link is more correct.  How would you add the "If-
> > Match:*" header using the Java Client Library?
>
> > Thanks,
> > Sting
> > On Jul 21, 7:40 am, sting1999 <[email protected]> wrote:
>
> > > Hi Julian,
>
> > > I am using Java Client Library 1.34.0.  I am able to get the auto-
> > > completion after creating the Group's email address as a contact via
> > > the Shared Contacts API.  I will need to be able to delete the Shared
> > > Contacts before adding all the Group's email address as a contact.
>
> > > How would add the "If-Match:*" header and entry ID using the Java
> > > Client Library?
>
> > > Thanks,
> > > Sting
>
> > > On Jul 21, 6:06 am, "Julian (Google)" <[email protected]> wrote:
>
> > > > Hi Sting,
>
> > > > What version of the Java Client library are you using? I think that
> > > > the latest version does not required to include the ETag information.
> > > > You can always add the "If-Match: *" header if needed. Also, try to
> > > > use the entry ID instead of the Edit URL: entry.getId()
>
> > > > The Shared Contacts sounds like a good way to add a Group's email
> > > > address as a contact, because this information is not included in
> > > > Profiles.
>
> > > > Cheers,
> > > > Julian.
>
> > > > On Jul 20, 8:51 pm, sting1999 <[email protected]> wrote:
>
> > > > > Hi Julian,
>
> > > > > I got this error when trying to delete thesharedcontact:
> > > > > com.google.gdata.util.ServiceForbiddenException: Forbidden
> > > > > If-Match or If-None-Match header required
>
> > > > > Here is my step to delete thesharedcontact:
> > > > > 1) ContactsService.delete(url);  (the contact edit URL that is
> > > > > retrieved from call the ContactsService.getFeed(query,
> > > > > ContactFeed.class)
>
> > > > > Thesharedcontact that I tried to delete is aGoogleAppsGroup,
> > > > > which I was able to add to theSharedContact and see the auto-
> > > > > completion in the CC, To, Bcc fields.
>
> > > > > Please let me know if the right way to delete thesharedcontact of 
> > > > > aGoogleAppsGroup.  Or, is it even correct to use theSharedContact
> > > > > for theGoogleAppsGroup?  I am not sure if the Profile API apply to
> > > > > my case (i.e. I just want to add theGoogleAppsGroup so that it will
> > > > > appear in the auto-completion).
>
> > > > > Thank you for your help.
>
> > > > > Regards,
> > > > > Sting
>
> > > > > On Jul 20, 5:21 am, "Julian (Google)" <[email protected]> wrote:
>
> > > > > > Hi Sting,
>
> > > > > > What error are you getting when you try to delete theSharedContact?
> > > > > > Do you still see theSharedContact on the feed?
>
> > > > > > Also, please double check that you are not trying to delete a 
> > > > > > Profile
> > > > > > (a domain's user), information about domain's users now shows in 
> > > > > > auto-
> > > > > > complete.
>
> > > > > > In case you need it, you can find more information about the Profile
> > > > > > API 
> > > > > > here:http://code.google.com/apis/apps/profiles/developers_guide_protocol.html
>
> > > > > > Cheers,
> > > > > > Julian.
>
> > > > > > On Jul 17, 11:58 pm, sting1999 <[email protected]> wrote:
>
> > > > > > > Hi All,
>
> > > > > > > Can someone help to confirm the steps to delete the 
> > > > > > > DomainSharedContacts?  Here is what I have done usingJavaclient 
> > > > > > > library:
>
> > > > > > > 1) Create a query to "http://www.google.com/m8/feeds/contacts/
> > > > > > > {MY_DOMAIN}/full" and set a max results to be very large (e.g. 
> > > > > > > 4,000)
> > > > > > > to ensure to get all thesharedcontacts
> > > > > > > 2) Call the  ContactsServer.getFeed() with the query and
> > > > > > > ContactFeed.class to get the ContactFeed
> > > > > > > 3) Loop through the ContactFeed entries
> > > > > > > 4) Get the ContactEntry's editURL, 
> > > > > > > e.g.http://www.google.com/m8/feeds/contacts/{MY_DOMAIN}/full/dsfds3ksdfj03al39
> > > > > > > 5) Delete thesharedcontact by calling the ContactService.delete
> > > > > > > (contactEntryEditURL)
>
> > > > > > > I understand that it may take 24 hours to remove thesharedcontact 
> > > > > > > so
> > > > > > > that it won't appear in the auto-complete.  I have waited more 
> > > > > > > than 24
> > > > > > > hours.
>
> > > > > > > Is there way to verify the ContactEntry is deleted?  I see there 
> > > > > > > is a
> > > > > > > has ContactEntry.hasDeleted() method, but I don't see any result
> > > > > > > (seeing my deleted contact entry).
>
> > > > > > > How to dump the ContactEntry out to a simple String to see the 
> > > > > > > actual
> > > > > > > its XML ATOM format?
>
> > > > > > > Thanks,
> > > > > > > Sting
>
> > > > > > > On Jul 3, 5:52 am, Daniel <[email protected]> wrote:
>
> > > > > > > > Thanks!
>
> > > > > > > > On 3 Juli, 14:41, Andre Roy <[email protected]> wrote:
>
> > > > > > > > > Daniel wrote:
>
> > > > > > > > > >> At least I think that's what I did.
>
> > > > > > > > > > It seems to work, I did a listing of mysharedcontacks 
> > > > > > > > > > through the
> > > > > > > > > > API and found my recently addedcontact. However I can't 
> > > > > > > > > > find the
> > > > > > > > > >contactin theContactsview and it doesn't show up when I start
> > > > > > > > > > typing an email address i gmail, normal?
>
> > > > > > > > > Wait a day. It seems to take quite a while for them to 
> > > > > > > > > actually show up
> > > > > > > > > in the email interface. I have no idea why  :(
>
> > > > > > > > > --
> > > > > > > > > Andre -- Yes, there _are_ stupid questions.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to