Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Can not retrive All Calendar
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
kdyande@gmail.com  
View profile  
 More options Nov 13 2007, 4:39 am
From: "kdya...@gmail.com" <kdya...@gmail.com>
Date: Tue, 13 Nov 2007 01:39:54 -0800
Local: Tues, Nov 13 2007 4:39 am
Subject: Can not retrive All Calendar
Hi,

I just make a simple Windows Application to retrive all of my
calendars.

I write the following code

string calendarALL = "http://www.google.com/calendar/feeds/default/
allcalendars/full";
.
.
.
CalendarService service = new CalendarService( "CalendarSampleApp" );
.
.
try
      {
        EventFeed calFeed = service.Query( query  ) as EventFeed;
.
.
.
      }
      catch( Google.GData.Client.GDataRequestException gg )
      {
      }

My point is..   How can I retrive my all calendars ???


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Timothy Parez  
View profile  
 More options Nov 13 2007, 5:38 am
From: "Timothy Parez" <timothypa...@gmail.com>
Date: Tue, 13 Nov 2007 11:38:00 +0100
Subject: Re: Can not retrive All Calendar
The query above should give you a list of all your calendars
including calendars people have shared with you.

Sending a query to
http://www.google.com/calendar/feeds/default/owncalendars/full
will give you a list of calendars owned by you.

Then you can use

// Create the query object:
EventQuery query = new EventQuery();
query.Uri = new
Uri("http://www.google.com/calendar/feeds...@gmail.com/private/full");

// Tell the service to query:
EventFeed calFeed = service.Query(query);

For each calendar url you retreived.
This is all documented in
http://code.google.com/apis/calendar/developers_guide_dotnet.html

I'll be in the office in a few hours, if you need some sample code
I should be able to send it to you then.

Timothy.

On Nov 13, 2007 10:39 AM, kdya...@gmail.com <kdya...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kdyande@gmail.com  
View profile  
 More options Nov 13 2007, 7:17 am
From: "kdya...@gmail.com" <kdya...@gmail.com>
Date: Tue, 13 Nov 2007 12:17:45 -0000
Local: Tues, Nov 13 2007 7:17 am
Subject: Re: Can not retrive All Calendar
Thanks Timothy,

Yes I want Sample code.....

I want to retrive all the calendar whichever I added in my
Calendar....
so that I use

string calendarALL = "http://www.google.com/calendar/feeds/default/
allcalendars/full";
by using ur code I can retrive only shared calendars and not public
calendar I added

Thanks for the Help..............

On Nov 13, 3:38 pm, "Timothy Parez" <timothypa...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Timothy Parez  
View profile  
 More options Nov 13 2007, 1:44 pm
From: Timothy Parez <timothypa...@gmail.com>
Date: Tue, 13 Nov 2007 18:44:54 -0000
Local: Tues, Nov 13 2007 1:44 pm
Subject: Re: Can not retrive All Calendar
Hi,

First I defined a simple class which represents a calendar (this is
part of a Google Calendar / Outlook sync application)

It begins like this:

    class Calendar
    {
        public event SyncEventHandler OnSyncEvent;

        private string title;
        private string googleUrl;
        private bool sync;

        public Calendar()
        {
            //Default
        }

       //continues here

Then I have a static method which retreives all calendars:
       public static List<Calendar> GetAllFromGoogle()
        {
            //Create a new list
            List<Calendar> calendars = new List<Calendar>();

            //Get the calendars
            FeedQuery query = new FeedQuery("http://www.google.com/
calendar/feeds/default");
            AtomFeed calendarFeed;

            calendarFeed = GoogleManager.Service.Query(query);

            foreach (AtomEntry entry in calendarFeed.Entries)
            {
                Calendar calendar = new Calendar();
                calendar.title = entry.Title.Text;
                calendar.googleUrl = entry.Links[0].AbsoluteUri;
                calendar.sync = false;

                calendars.Add(calendar);
            }

            return calendars;
        }

This basically retreives a List<Calendar>

In order to fetch Appointments from a calendar, I defined a normal
method for the Calendar class:

        public List<AppointmentItem> GetAllAppointmentsFromGoogle()
        {
            List<AppointmentItem> googleItems = new
List<AppointmentItem>();

            EventQuery query = new EventQuery(this.googleUrl);
            EventFeed googleEntries =
GoogleManager.Service.Query(query);

            foreach (EventEntry entry in googleEntries.Entries)
            {
                AppointmentItem appointment =
(AppointmentItem)OutlookManager.Outlook.CreateItem(OlItemType.olAppointment Item);
                appointment.ItemProperties.Add("googleid",
OlUserPropertyType.olText, null, null).Value = entry.Id.Uri.Content;
                appointment.ItemProperties.Add("calendarurl",
OlUserPropertyType.olText, null, null).Value = this.googleUrl;
                appointment.ItemProperties.Add("googleupdated",
OlUserPropertyType.olDateTime, null, null).Value = entry.Updated;
                appointment.ItemProperties.Add("googleediturl",
OlUserPropertyType.olText, null, null).Value = (entry.EditUri !=
null ? entry.EditUri.Content : "");

                if (entry.Times.Count > 0)
                {
                    appointment.Start = entry.Times[0].StartTime;
                    appointment.End = entry.Times[0].EndTime;

                    appointment.Body = entry.Summary.Text;
                    appointment.Subject = entry.Title.Text;

                    if (entry.Locations.Count > 0)
                        appointment.Location =
entry.Locations[0].ValueString;

                    googleItems.Add(appointment);

                }
                else
                {
                    //Recurring event... need to add support
                }

            }

            return googleItems;
        }

In this case, it retreives all Google Appointments as Outlook
Appointments (classes provided by Microsoft)

This should be all you need to retreive all appointments for all your
calendars, including calendars people
have shared with you.

Is this what you are looking for?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »