Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-23-2007, 01:03 AM
Junior Member
 
Join Date: Aug 2007
Posts: 4
Question GDATA : how to get an other calendar than the default one ?

hello
everything is in the title
i need to get events from another cal than the default one.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-23-2007, 02:43 AM
Junior Member
 
Join Date: Aug 2007
Posts: 4
Thumbs up

i see that the question is reccurent.
i have found a way to have an answer.

using the calendar link :

Code:
// get the calendars list feed

$gdataCal = new Zend_Gdata_Calendar($client);
$calFeed = $gdataCal->getCalendarListFeed();

// get the calendar url (0 is first one, then 1 is second one etc...)

$url = $calFeed[1]->link[0]->href;

// ask for feeds

$events = $gdataCal->getCalendarEventFeed($url);
....
the same using queries :

Code:
// get the calendars list feed

$gdataCal = new Zend_Gdata_Calendar($client);
$calFeed = $gdataCal->getCalendarListFeed();

// get the calendar user ( $cals[1] for the first calendar... )

$id = $cals[1]->id->text;
$user = str_replace(Zend_Gdata_Calendar::CALENDAR_FEED_URI.'/default/', "", $id); // kind of dirty way to get the info, nut it lokks working :)

// ask for feeds

$query->setUser($user);
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setFutureevents('true');
$events = $gdataCal->getCalendarEventFeed($query);
......

Last edited by wene : 08-23-2007 at 04:04 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:15 AM.