Hi, I had download de .net api
Now I have this error: Execution of authentication request failed
This occurs alternate, once work, another not, after work again ->
work, don't work, work, don't work
Below my code:
try
{
CalendarService googleCalendar = new CalendarService(sistema);
googleCalendar.setUserCredentials(usuario, senha);
EventQuery eventQuery = new EventQuery();
eventQuery.Uri = new Uri("http://www.google.com/calendar/feeds/
default/private/full");
eventQuery.StartTime = DateTime.Parse(oldInicio.ToString("yyyy-MM-
ddTHH:mm:ss"));
eventQuery.EndTime = DateTime.Parse(oldFim.ToString("yyyy-MM-
ddTHH:mm:ss"));
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
EventFeed resultsQuery = googleCalendar.Query(eventQuery); //Here
is where the ERROR happen
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
When eventTimes;
foreach (EventEntry evento in resultsQuery.Entries)
if (evento.Title.Text == oldTitulo &&
evento.Times[0].StartTime==oldInicio &&
evento.Times[0].EndTime==oldFim)
{
evento.Authors.Add(new AtomPerson(AtomPersonType.Author, autor));
evento.Title = new
AtomTextConstruct(AtomTextConstructElementType.Title, titulo);
evento.Summary = new
AtomTextConstruct(AtomTextConstructElementType.Summary, sumario);
evento.Content.Content = texto;
eventTimes = new When();
string inicioEvento = inicio.ToString("yyyy-MM-ddTHH:mm:ss");
string fimEvento = fim.ToString("yyyy-MM-ddTHH:mm:ss");
eventTimes.StartTime = DateTime.Parse(inicioEvento);
eventTimes.EndTime = DateTime.Parse(fimEvento);
evento.Times.Add(eventTimes);
evento.Update();
break;
}
}
catch (Exception e)
{
throw new InvalidCastException("NÆo foi poss¡vel alterar o evento no
calend rio Google\n" + e.Message);
}
Adriano Rodenbusch
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google 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://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---