Hey Jesse, To delete an entry, you do not have to send any XML. It is enough to send a DELETE request to the url specified in the <link rel="edit" href="..."/> tag. To update an entry, you send an PUT request to the edit url. You should leave out the <id> and <link> tags, they are added by Google.
Philipp http://www.google.com/calendar/feeds/jesse.war...%40gmail.com/ On Feb 25, 9:59 pm, "Jesse Warden" <[EMAIL PROTECTED]> wrote: > Upon reading this section: > > http://code.google.com/apis/gdata/basics.html#Updating-an-entry > > It seems the only thing I need to modify explicitly is to add the link > attribute. What it doesn't really say is how I "get" the id. So, I just > figure I'm supposed to use the url that is in the ID node if you get an > event. So, I add both for updating (nothing for delete based on docs which > seem to be missing the delete example): > > <link rel="edit" href="[my url from id node]" /> > > Both updating and delete, however, keep getting back 400's. If I simply > send the XML chunk as is, it creates a new event just fine. Additionally, I > am adding the X-HTTP-Method-Override: PUT for updating and > X-HTTP-Method-Override: DELETE for deleting, but again, it doesn't really > matter, Google hates it. The docs say I can do a POST as long as I modify > those headers and put the link node in there with the proper rel value. > > Example XML for delete: > > <entry > xmlns='http://www.w3.org/2005/Atom'xmlns:gd='http://schemas.google.com/g/2005'><id>[big > ole url]</id><link rel="delete" > /><category > scheme='http://schemas.google.com/g/2005#kind'term='http://schemas.google.com/g/2005#event'></category><title > type='text'>test > php</title><content type='text'>test desc php</content><author><name>Jesse > Warden in PHP</name><email>[EMAIL PROTECTED]</email></author><gd:transparency > value='http://schemas.google.com/g/2005#event.opaque'></gd:transparency><gd:eventStatus > value='http://schemas.google.com/g/2005#event.confirmed'></gd:eventStatus><gd:where > valueString='test where php'></gd:where><gd:when > startTime='2007-02-18T18:00:00-04:00' > endTime='2007-02-18T19:00:00-04:00'><gd:reminder minutes='10' > /></gd:when></entry> > > Example XML for update: > > <entry > xmlns='http://www.w3.org/2005/Atom'xmlns:gd='http://schemas.google.com/g/2005'><id>[big > ole url]</id><link rel="edit" > href="[big ole url]" /><category > scheme='http://schemas.google.com/g/2005#kind'term='http://schemas.google.com/g/2005#event'></category><title > type='text'>test > php</title><content type='text'>test desc php</content><author><name>Jesse > Warden in PHP</name><email>[EMAIL PROTECTED]</email></author><gd:transparency > value='http://schemas.google.com/g/2005#event.opaque'></gd:transparency><gd:eventStatus > value='http://schemas.google.com/g/2005#event.confirmed'></gd:eventStatus><gd:where > valueString='test where php'></gd:where><gd:when > startTime='2007-02-18T18:00:00-04:00' > endTime='2007-02-18T19:00:00-04:00'><gd:reminder minutes='10' > /></gd:when></entry> > > Any clue what I'm doing wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data 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-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
