type Gcal = {
token: string;
};
export async function main(gcal_auth: Gcal, calendarId: string) {
const LIST_EVENTS_URL = `https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events`;
const token = gcal_auth["token"];
const response = await fetch(LIST_EVENTS_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
const result = await response.json();
return result;
}
Submitted by admin 497 days ago
type Gcal = {
token: string;
};
export async function main(
gcal_auth: Gcal,
calendarId: string,
) {
const LIST_EVENTS_URL =
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events`;
const token = gcal_auth["token"];
const response = await fetch(LIST_EVENTS_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
const result = await response.json();
return result;
}
Submitted by admin 500 days ago
import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts";
export async function main(
gcal_auth: wmill.Resource<"gcal">,
calendarId: string,
) {
const LIST_EVENTS_URL =
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events`;
const token = gcal_auth["token"];
const response = await fetch(LIST_EVENTS_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
const result = await response.json();
return result;
}
Submitted by adam186 628 days ago
import * as wmill from "https://deno.land/x/windmill@v1.70.1/mod.ts";
export async function main(
gcal_auth: wmill.Resource<"gcal">,
calendarId: string,
) {
const LIST_EVENTS_URL =
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events`;
const token = gcal_auth["token"];
const response = await fetch(LIST_EVENTS_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
const result = await response.json();
return result;
}
Submitted by adam186 663 days ago
import * as wmill from "https://deno.land/x/windmill@v1.23.0/mod.ts";
export async function main(
gcal_auth: wmill.Resource<"gcal">,
calendarId: string,
) {
const LIST_EVENTS_URL =
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events`;
const token = gcal_auth["token"];
const response = await fetch(LIST_EVENTS_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
const result = await response.json();
return result;
}
Submitted by rossmccrann 880 days ago