Calendar entry does have a magic getter to the link property (an array). Tried accessing the first item from that property and found the URL works with inserting a new event. Not sure what the getSelfLink function is used for but the URL it returns is completely different from what is expected.
Seems like a common trap to fall into with using the wrong function, which appears to do what is needed but does something else entirely. On Nov 3, 5:27 am, Alain Vongsouvanh <[email protected]> wrote: > Hello, > > I don't know if there is a getter in PHP to directly access this attribute, > but a Calendar entry has a link with a rel set to > "http://schemas.google.com/gCal/2005#eventFeed" that looks like this: > > *<link rel='http://schemas.google.com/gCal/2005#eventFeed' > type='application/atom+xml' > href='https://www.google.com/calendar/feeds/calendarID/private/full'/>* > > This is the URL you should send your POST request to to create an event. > > Best, > Alain > > > > > > > > > > On Tue, Nov 1, 2011 at 5:49 PM, Nick Apperley <[email protected]> wrote: > > How do I get the url for the calendar that the new event is going to > > be inserted into? Tried to insert an event but ended up with an HTTP > > 400 message. It appears as though the url retrieved from the selected > > calendar is invalid. Below is the piece of code used to get the url: > > > $url = $cal->getSelfLink()->getHref(); > > > -- > > 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 | Developer Programs Engineer -- 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
