Hello Alain!
Thank you it worked! I needed the etag!
I'm add for the EventEntry class this:
" @Key("@gd:etag")
public String etag;"
and the executeDelete looks like that:
" public void executeDelete(EventEntry entry) throws IOException {
HttpRequest request = requestFactory.buildDeleteRequest(new
GenericUrl(entry.getEditLink()));
request.headers.ifMatch = entry.etag;
request.execute();
}"
Thanks again,
Leslie.
On júl. 15, 17:58, Alain Vongsouvanh <[email protected]> wrote:
> Hello Leslie,
>
> Do you get any particular error? From what I can see, I think the request is
> missing the "If-match" header which should include the entry's ETag in order
> not to delete another client changes in case you don't have the latest
> version of the entry.
>
> You can find more information about Etag
> here<http://code.google.com/apis/gdata/docs/2.0/reference.html#ResourceVer...>
> .
>
> Best,
> Alain
>
> On Thu, Jul 14, 2011 at 9:32 AM, Kárpáti László
> <[email protected]>wrote:
>
>
>
>
>
>
>
>
>
> > ...and I'am started to build my model from this "base" (calendar-v2-
> > atom-oauth-sample):
>
> >http://code.google.com/p/google-api-java-client/source/browse/?repo=s...
>
> > On júl. 14, 17:28, Kárpáti László <[email protected]> wrote:
> > > Hi,
> > > I would like to delete an event from a calendar with the followoing
> > > code:
>
> > > //insertedEntry is the event what I want to delete
> > > "client.executeDelete(insertedEntry);"
>
> > > in the Class CalendarClient:
>
> > > " public void executeDelete(Entry entry) throws IOException {
> > > HttpRequest request = requestFactory.buildDeleteRequest(new
> > > GenericUrl(entry.getEditLink()));
> > > request.execute().ignore();
> > > }",
>
> > > What's wrong?
>
> > > Thanks,
> > > Leslie.
>
> > --
> > 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://code.google.com/apis/calendar/community/forum.html
>
> --
> Alain Vongsouvanh
--
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://code.google.com/apis/calendar/community/forum.html