Clojure interface to Google Calendar API
IN PROGRESS
GCal requires an OAuth Token. The library provides some helpers for this.
Generate the OAuth URL
(require [gcal.auth :as auth])
;; Get the URL to visit
(auth/offline-access-uri)
;; Visit the URL and grab the token from the callback URL
(generate-access-token YOURTOKEN)
;; => your access token
(ns myapp.core
(:use [gcal.calendars :as calendars]))
A list of all available calendars
(calendars/all "OAUTH TOKEN")
Show a single calendar. Your calendar id will look something like "6nasdg9sebcv9oqt6qu8hcdgi8@group.calendar.google.com"
(calendars/show "OAUTH TOKEN" "CALENDAR_ID")
(ns myapp.core
(:use [gcal.events :as events]))
A list of all events for a given calendar
(events/all "OAUTH TOKEN" "CALENDAR_ID")
Create a new quick add event
(events/quick-add "OAUTH TOKEN" "CALENDAR_ID" "my awesome event")
Copyright © 2013 Google Owain Lewis
Distributed under the Eclipse Public License, the same as Clojure.