2010-03-09 11 views
6

Quiero crear eventos recurrentes de Calendario con la API de Google. estoy siguiendo enlaces:¿Cómo crear "recurData" en Google Calendar?

  1. Google Calendar API

    No estoy recibiendo cómo crear "recurData". No puedo modificar String y pasarlo como parámetro. Probado DDay.iCal Versión 0.80. también.

  2. DDay.iCal

Hay un código de ejemplo given.I las probó. Puedo crear el archivo ".ics".

Pero cuando pase este contenido archivo como "recurData"

Obtención de error: { "Ejecución de solicitud ha fallado: http://www.google.com/calendar/feeds/[email protected]/private/full?gsessionid=AHItK5wrSIoJVawFjGt-0g"}

Mi contenido del archivo ICF es:

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 

Lo hice usando "Ejemplo6".

Respuesta

2

Cree que esta muestra nos dirá que usted crea su Entrada de calendario con la clase EventEntry. Luego pasa una repetición a esa entrada.

En el ejemplo de Google, los campos DTSTART y DTEND representan el inicio y el final de la recurrencia.

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; 
Cuestiones relacionadas