I'm new to Google Calendar API's - I'm trying to add time off's to a public 
calendar.
 
 Dim Google_Service As New CalendarService("SCS")
        Google_Service.setUserCredentials("me", "passwrd")
        Dim New_Entry As New EventEntry
        New_Entry.Title.Text = "PTO EJC"
        New_Entry.Content.Content = "PTO EJC"
        Dim Event_Location As New Where
        Event_Location.ValueString = "PTO"
        New_Entry.Locations.Add(Event_Location)
        Dim Event_Time As New [When](CDate("04/16/2011 08:00"), 
CDate("04/16/2011 16:00"))
        New_Entry.Times.Add(Event_Time)
        Dim Post_URI As New Uri("
https://www.google.com/calendar/feeds/default/allcalendars/full/****_2d3636303232313239323331%40resource.calendar.google.com
")
        Dim Inserted_Entry As AtomEntry = Google_Service.Insert(Post_URI, 
New_Entry)
 
When I run this I get the following error:
 
Google.GData.Client.GDataRequestException was unhandled
  Message=Execution of request failed: 
http://www.google.com/calendar/feeds/default/allcalendars/full/*****[email protected]
  ResponseString=Invalid request URI
  Source=Google.GData.Client
  StackTrace:
       at Google.GData.Client.GDataRequest.Execute()
       at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
       at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
       at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
       at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
       at Google.GData.Client.GDataGAuthRequest.Execute()
       at Google.GData.Client.Service.EntrySend(Uri feedUri, AtomBase 
baseEntry, GDataRequestType type, AsyncSendData data)
       at Google.GData.Client.Service.Insert(Uri feedUri, AtomEntry 
newEntry, AsyncSendData data)
       at Google.GData.Client.Service.Insert[TEntry](Uri feedUri, TEntry 
entry)
       at ConsoleApplication1.Module1.Main() in 
C:\Users\Edward\documents\visual studio 
2010\Projects\ConsoleApplication1\ConsoleApplication1\Module1.vb:line 42
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] 
args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence 
assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext 
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Net.WebException
       Message=The remote server returned an error: (400) Bad Request.
       Source=System
       StackTrace:
            at System.Net.HttpWebRequest.GetResponse()
            at Google.GData.Client.GDataRequest.Execute()
       InnerException: 
 
I'm not sure what is wrong - I grabbed the Calendar ID from the website - I 
just added the ***** to hide the company information.
 
Ed

-- 
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

Reply via email to