ameykhadatkar / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Service.Insert(Uri, EventEntry) doesn't return anything #669

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Here is the code :

FeedQuery query = new FeedQuery();
Service service = new Service("cl", "AppName");
service.setUserCredentials("login", "password");

EventEntry entry = new EventEntry();
entry.Title.Text = "Redo the bug";
entry.Content.Content = "The application should crash";
entry.Times.Add(new When(DateTime.Parse("2013-08-29 11:00"), 
DateTime.Parse("2013-08-29 12:00")));

Uri postUri = new 
Uri("http://www.google.com/calendar/feeds/myemail/private/full");

EventEntry insertedEntry = service.Insert(postUri, entry) as EventEntry;

// insertedEntry is null then next line will crash
return insertedEntry.EventId;

The event is correctly created on my calendar, but the method doesn't return 
the created object.
So I can't manage it (I need to store the created ID in order to update/delete 
then easily)

Using those dependencies, current version :
Google.GData.Client;
Google.GData.Extensions;
Google.GData.Calendar;

Windows Seven 64 bits
Visual Studio 2012 For Desktop Express
Framework 4.0
Windows Form application.

Original issue reported on code.google.com by administ...@manga-torii.com on 29 Aug 2013 at 2:45

GoogleCodeExporter commented 8 years ago
Hmm strange, it works on my side, I am using the exact same calls like you, and 
I get an entry returned. Can you try to use the following feed uri: 
"https://www.google.com/calendar/feeds/default/private/full"

Original comment by Saller....@gmail.com on 10 Mar 2014 at 5:03