Just get the events, sorted by last updated time, and look for the
first event that has the same creation date as the updated date. There
is no easy way to instruct the server to give you that event. But you
should be receiving the event as a response from the insertEvent()
query, isn't that enough?

Philipp

On May 15, 10:59 am, DaNieL <[EMAIL PROTECTED]> wrote:
> Hi,
> how can i retrieve the ID of the last event that i add?
>
> i use a function like this (it's just a test function, but the final
> structure will be similar):
>
> function GCInsert($service, $IDcalendar, $inizio, $fine, $titolo,
> $testo=false){
>                 $event = $service->newEventEntry();
>                 $calUri = 
> 'http://www.google.com/calendar/feeds/'.$IDcalendar.'/
> private/full';
>                 if($titolo){ $event -> title = $service->newTitle($titolo); }
>                 if($testo){ $event -> content = $service->newContent($testo); 
> }
>                 $when = $service -> newWhen();
>                 $tzOffset = "+02";
>                 list($startDate, $startTime)=explode($inizio, '|');
>                 list($endDate, $endTime)=explode($fine, '|');
>                 $when -> startTime = 
> "{$startDate}T{$startTime}:00.000{$tzOffset}:
> 00";
>                 $when -> endTime = 
> "{$endDate}T{$endTime}:00.000{$tzOffset}:00";
>                 $event -> when = array($when);
>                 $newEvent = $service->insertEvent($event, $calUri);
>
> }
>
> then, how can i get the ID of the event added?
>
> there is a method that works like the mysql_inser_id() function?
--~--~---------~--~----~------------~-------~--~----~
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://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to