问题描述
我要创建使用谷歌API日历周期性事件。
我下面的链接:
I want to create recurring events of Calendar using Google API.I am following links:
-
的
我没有得到如何创建recurData 。
我不能修改字符串,并把它作为参数。
试过DDay.iCal版本0.80 同时
I am not getting how to create "recurData".I can't modify String and pass it as parameter.Tried DDay.iCal Version 0.80. also.
的
有一些示例代码given.I尝试过。
我能创造的.ics文件。
There are some Example code given.I tried them.I am able to create ".ics" file.
但是,当我通过这个文件内容为recurData
But when i pass this file content as "recurData"
获取错误:
{的要求执行失败:的}
Getting Error : {"Execution of request failed: http://www.google.com/calendar/feeds/[email protected]/private/full?gsessionid=AHItK5wrSIoJVawFjGt-0g"}
我的ICF文件内容是:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//DDay.iCal//NONSGML ddaysoftware.com//EN
BEGIN:VEVENT
CREATED:20100309T132930Z
DESCRIPTION:The event description
DTEND:20100310T020000
DTSTAMP:20100309T132930Z
DTSTART:20100309T080000
LOCATION:Event location
SEQUENCE:0
SUMMARY:18 hour event summary
UID:396c6b22-277f-4496-bbe1-d3692dc1b223
END:VEVENT
BEGIN:VEVENT
CREATED:20100309T132930Z
DTEND;VALUE=DATE:20100315
DTSTAMP:20100309T132930Z
DTSTART;VALUE=DATE:20100314
SEQUENCE:0
SUMMARY:All-day event
UID:ac25cdaf-4e95-49ad-a770-f04f3afc1a2f
END:VEVENT
END:VCALENDAR
我做它采用Example6。
推荐答案
据认为这个样本将告诉我们,你创建你的日历项在EventEntry类。然后,你传递一个复发的条目。
It think this sample will tell us, that you create your Calendar Entry with the EventEntry Class. Then you pass a recurrence to that entry.
在谷歌的例子中,DTSTART和DTEND的字段代表复发的开始和结束。
In google's example the DTSTART and DTEND Fields are representing the start and end of the recurrence.
EventEntry myEntry = new EventEntry();
myEntry.Title.Text = "Hello recurring Event!";
// Set a location for the event.
Where eventLocation = new Where();
eventLocation.ValueString = "here and there";
entry.Locations.Add(eventLocation);
// Any other event properties
// Recurring event:
String recurData =
"DTSTART;VALUE=DATE:20070501\r\n" +
"DTEND;VALUE=DATE:20070502\r\n" +
"RRULE:FREQ=WEEKLY;BYDAY=Tu;UNTIL=20070904\r\n";
Recurrence recurrence = new Recurrence();
recurrence.Value = recurData;
myEntry.Recurrence = recurrence;
这篇关于如何创建" recurData"在谷歌日历?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!