[IronPython] gdata calendarservice.Insert
dinov at microsoft.com
Tue Mar 17 18:01:23 CET 2009
The method you're trying to call is generic so you need to index into it to provide the generic type:
We're considering adding inference for these type parameters in the future.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of starisk11 at gmail.com
Sent: Tuesday, March 17, 2009 9:25 AM
To: users at lists.ironpython.com
Subject: [IronPython] gdata calendarservice.Insert
This is a kinda off-topic, since its a programming issue of Ironpython with GoogleData CalendarService. Specifically, the "Service.Insert" Method which is overloaded and can be on any of the following form;
Now on the given sample of GDATA which is on CS about Creating calendar events<http://code.google.com/apis/calendar/docs/2.0/developers_guide_dotnet.html#CreatingSingle>, specifically the last line;
// Send the request and receive the response:
AtomEntry insertedEntry = service.Insert(postUri, entry);
How should I code this in python or IronPython? Here is my attempt that resulted to error.
>>> import clr
>>> import System
>>> import Google.GData.Client as GDClient
>>> import Google.GData.Calendar as GDCal
>>> import Google.GData.Extensions as GDxtn
>>> mycalsvc = GDCal.CalendarService("myapp")
>>> myentry = GDCal.EventEntry()
>>> myentry.Title.Text = "Tennis with Beth"
>>> myentry.Content.Content = "Meet for a quick lesson."
>>> myposturi = System.Uri("http://www.google.com/calendar/feeds/default/private
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Insert() takes exactly 4 arguments (2 given)
Again, sorry if its off-topic. But I appreciate any help here.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users