diff --git a/getcalendar.sh b/getcalendar.sh index 1c7c2c2..260b853 100644 --- a/getcalendar.sh +++ b/getcalendar.sh @@ -1,7 +1,12 @@ +#!/usr/bin/env bash + +# Fetch calendar data; will be stored as calendar.json + CALENDAR_ID="nerseigospses068jd57bk5ar8@group.calendar.google.com" API_KEY="AIzaSyDJkXq1faq2G5NkFkFTh9Sikdpc2YXTVXs" NOW=$(date '+%Y-%m-%dT%H:%M:%SZ') OPTS="?key=${API_KEY}&timeMin=${NOW}&singleEvents=true&orderBy=startTime&timezone=UTC&maxResults=20" + curl -sS -o calendar.json "https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID}/events${OPTS}" \ -H 'accept: application/json, text/javascript, */*; q=0.01' \ -H 'origin: https://events.apache.org'