//native
type Gcal = {
token: string;
};
export async function main(gcal_auth: 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 hugo989 6 days ago