Skip to content

Instantly share code, notes, and snippets.

@comewalk
Created August 13, 2012 06:00
Show Gist options
  • Save comewalk/3337283 to your computer and use it in GitHub Desktop.
Save comewalk/3337283 to your computer and use it in GitHub Desktop.
create a new event via calendar api
# Create a new event
say '=== Create a new event ===';
my $new_event = {
'summary' => '宇宙兄弟',
'location' => '日本テレビ',
'start' => {
'dateTime' => '2012-08-12T07:00:00+09:00',
},
'end' => {
'dateTime' => '2012-08-12T07:30:00+09:00',
},
};
my $added_event = $service->events->insert(
calendarId => $calendar_id,
body => $new_event,
)->execute({ auth_driver => $auth_driver });
say $added_event->{id};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment