setApplicationName('Akce'); $client->setScopes(array(Google_Service_Calendar::CALENDAR)); $client->setAuthConfig($credentials); $client->setAccessType('offline'); $client->getAccessToken(); $client->getRefreshToken(); $service = new Google_Service_Calendar($client); $event = new Google_Service_Calendar_Event(array( 'summary' => 'testing', 'location' => '800 Howard St., San Francisco, CA 94103', 'description' => 'A chance to hear more about Google\'s developer products.', 'start' => array( 'dateTime' => '2024-05-28T09:00:00-07:00', 'timeZone' => 'Europe/Prague', ), 'end' => array( 'dateTime' => '2024-05-28T17:00:00-07:00', 'timeZone' => 'Europe/Prague', ), 'recurrence' => array( 'RRULE:FREQ=DAILY;COUNT=2' ), 'attendees' => array(), 'reminders' => array( 'useDefault' => FALSE, 'overrides' => array( array('method' => 'email', 'minutes' => 24 * 60), array('method' => 'popup', 'minutes' => 10), ), ), )); $calendarId = 'kapela.tremolo@gmail.com'; $event = $service->events->insert($calendarId, $event); print_r($event->htmlLink); }