Hello,

I am sorry but I'm not sure I understand your issue. Are you saying that
you manage to retrieve holiday calendar's events when sending a request to
get events from your primary calendars?

If that is the case, can you print the organizer and the attendees of those
events to make sure you do not appear in any of the fields? You might have
some point imported all the events in your primary calendar which would
explain why you see those with such a query.

Best,
Alain

On Wed, Nov 2, 2011 at 6:19 PM, Иван Клименко <[email protected]> wrote:

> Hello.
> I have main calendar([email protected]) and calendar of holidays.
> I want receive events, sorted by calendar name.
>
> //Create service
> CalendarService service = new CalendarService("CalendarSampleApp");
> string userName = this.UserName.Text;
> string passWord = this.Password.Text;
>  if (userName != null && userName.Length > 0)
>             {
>                 service.setUserCredentials(userName, passWord);
>             }
> //Create Calendar query
> CalendarQuery query = new CalendarQuery();
> query.Uri = new Uri("
> https://www.google.com/calendar/feeds/default/allcalendars/full";);
> //Get all calendars
> CalendarFeed resultFeed = (CalendarFeed)service.Query(query);
> // Get info from each calendar
>  foreach (CalendarEntry entry in resultFeed.Entries)
>             {
>                 listBox1.Items.Add(entry.Title.Text);
>                 //Get calendar events
>                 var calUri = entry.Content.Src.Content;
>                 var q = new EventQuery(calUri);
>                 q.EndTime = DateTime.Now.AddMonths(2);
>                 q.StartTime = DateTime.Now.AddMonths(-2);
>                 //Request events
>                 EventFeed feeds = service.Query(q) as EventFeed;
>
>                 while (feeds != null && feeds.Entries.Count > 0)
>                 {
>                     // Display events info
>                     foreach (EventEntry eventEntry in feeds.Entries)
>                     {
>                         this.richTextBox1.AppendText(entry.Title.Text + "
> " +
>                             eventEntry.Times[0].StartTime.ToString() + " "
> +
>                             eventEntry.Title.Text + "\r\n" );
>                     }
>
>                     if (feeds.NextChunk != null)
>                     {
>                         q.Uri = new Uri(feeds.NextChunk);
>                         feeds = service.Query(q);
>                     }
>                     else
>                     {
>                         feeds = null;
>                     }
>                 }
> This code work fine. BUT!
> With events of my main calendar i got all events from "holiday" calendar.
> And with "holiday" calendar i got all holiday events.
> What i doing wrong?
>
>
>  --
> 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

Reply via email to