谷歌日历 - 从一个特定的日历获取事件 [英] Google Calendar - get events from a SPECIFIC calendar

查看:164
本文介绍了谷歌日历 - 从一个特定的日历获取事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望这将是比较容易的人谁是熟悉的谷歌日历的API,也做了一些搜索,但API没有给我答案!

I'm hoping this will be relatively easy to someone who is familiar with the Google Calendar API, have done some searching but the API isn't giving me the answer!

想象一下,一个谷歌帐户有3个日历,该用户的所有创建的。

Imagine that a Google Account has 3 calendars, all created by that user.

我试图从用户的特定的日历获取事件,使用.NET谷歌API,如下:

I'm trying to get events from a SPECIFIC calendar of that user, using the .NET Google API, as follows:

    Calendar.userName = CalendarUserName;
    Calendar.userPassword = CalendarPassword;
    Calendar.feedUri = "https://www.google.com/calendar/feeds/default/private/full";

这也就给我从所有的日历,这固然很好的所有事件的饲料,但我需要解析它们(presumably有一种方法来确定,但我不知道,要么)

What that gives me is the feed of ALL events from ALL calendars, which is all very well, but then I need to parse them (presumably there is a way to identify but I don't know that either).

什么是理想情况是,我能摘樱桃,并要求一个特定的日历,只得到一个事件。

What would be ideal is for me to be able to cherry-pick and ask for a particular calendar, and only get the events from that one.

这可能吗?难道只能用神奇的cookie的要求吗?

Is that possible? Is it only possible using the magic-cookie request?

谢谢 邓肯

推荐答案

你读过这一个?

的http:// code。 google.com/apis/calendar/data/2.0/reference.html#Event_feeds

和这一个?

http://$c$c.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html#RetrievingEvents

这是关键的部分去了解它,我认为:

This is the key part to understand it I think:

请注意:有些code片段的展示   添加事件到默认日历   或特定用户的主   日历(代Gmail地址   在POST的默认字符串   URI),但事件也可以加入到   非主日历为好。去做   这一点,你只需要简单的日历ID   可以从被检索   allcalendars饲料,并且还示出   中的日历设置页面   UI。这个ID是饲料中再次使用   URI:    https://www.google.com/calendar/feeds/id/private/full

Note: Some of these code snippets show adding an event to a default calendar or to a specific user's primary calendar (substituting a gmail address for the 'default' string in the POST URI), but events can also be added to non-primary calendars as well. To do this, you simply need the calendar ID which can be retrieved from the allcalendars feed, and is also shown in the Calendar Settings page of the UI. This id is again used in the feed URI: https://www.google.com/calendar/feeds/id/private/full.

<一个href="http://$c$c.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html#RetrievingCalendars" rel="nofollow">http://$c$c.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html#RetrievingCalendars

这篇关于谷歌日历 - 从一个特定的日历获取事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆