Get Calendar List ( gcal)
One script reply has been approved by the moderators Verified

Created by rossmccrann 244 days ago Viewed 193 times 1 Point

No comments yet

Login to be able to comment
Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
import * as wmill from "https://deno.land/x/windmill@v1.70.1/mod.ts";

export async function main(
  gcal_auth: wmill.Resource<"gcal">,
) {
  const CALENDAR_LIST_URL =
    `https://www.googleapis.com/calendar/v3/users/me/calendarList`;

  const token = gcal_auth["token"];

  const response = await fetch(CALENDAR_LIST_URL, {
    method: "GET",
    headers: {
      Authorization: "Bearer " + token,
      "Content-Type": "application/json",
    },
  });

  const result = await response.json();

  return result;
}

Submitted by rossmccrann 244 days ago

Edited 27 days ago

No comments yet

Login to be able to comment