<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>{5} Setfive - Talking to the World &#187; GData</title>
	<atom:link href="http://shout.setfive.com/tag/gdata/feed/" rel="self" type="application/rss+xml" />
	<link>http://shout.setfive.com</link>
	<description></description>
	<lastBuildDate>Wed, 18 Jan 2012 21:09:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Google Calendar API create on alternate calendar</title>
		<link>http://shout.setfive.com/2009/07/26/google-calendar-api-create-on-alternate-calendar/</link>
		<comments>http://shout.setfive.com/2009/07/26/google-calendar-api-create-on-alternate-calendar/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 04:47:30 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[GData]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=197</guid>
		<description><![CDATA[A few months ago we integrated Google calendar into an application that we built for a client. Anyway, today I sat down to customize which calendars certain events were being created on. We’re using the Zend Framework’s GData package to interact with Google Calendar and surprisingly the documentation is pretty lacking. Specifically, I was looking [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago we integrated Google calendar into an application that we built for a client. Anyway, today I sat down to customize which calendars certain events were being created on. We’re using the Zend Framework’s GData package to interact with Google Calendar and surprisingly the documentation is pretty lacking.</p>
<p>Specifically, I was looking to create events on a calendar that was not the “primary” calendar for a user. After poking around and experimenting, I finally got things to work.</p>
<p>First, you can retrieve the list of available calendars with:</p>
<pre name="code" class='php'>
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$user = sfConfig::get("app_gcal_user");
$pass = sfConfig::get("app_gcal_password");

$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
self::$service = new Zend_Gdata_Calendar($client);
$calFeed = self::$service-&gt;getCalendarListFeed();

$arr = array();
foreach ($calFeed as $calendar) {
  $arr[] = array( “title” =&gt; $calendar-&gt;title-&gt;text, “uri” =&gt; $calendar-&gt;getEditLink(“alternate")-&gt;href   );
}
</pre>
<p>Next, when creating the events pass in the uri and the events will appear on the alternate calendar.</p>
<pre class="php" name="code">
self::$service-&gt;insertEvent($event, $arr[1][“uri”]);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2009/07/26/google-calendar-api-create-on-alternate-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

