From 29e316e0c29023e42a58f09b9d34eb5f0bba5da3 Mon Sep 17 00:00:00 2001 From: Sebb Date: Fri, 19 Apr 2024 00:37:13 +0100 Subject: [PATCH] Docco --- getcalendar.sh | 5 +++++ 1 file changed, 5 insertions(+) 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'