type Gdocs = {
token: string;
};
export async function main(gdocs_auth: Gdocs, documentId: string) {
const token = gdocs_auth["token"];
const GET_DOC_URL = `https://docs.googleapis.com/v1/documents/${documentId}`;
const response = await fetch(GET_DOC_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
Submitted by admin 576 days ago
type Gdocs = {
token: string;
};
export async function main(
gdocs_auth: Gdocs,
documentId: string,
) {
const token = gdocs_auth["token"];
const GET_DOC_URL =
`https://docs.googleapis.com/v1/documents/${documentId}`;
const response = await fetch(GET_DOC_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
Submitted by admin 579 days ago
import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts";
export async function main(
gdocs_auth: wmill.Resource<"gdocs">,
documentId: string,
) {
const token = gdocs_auth["token"];
const GET_DOC_URL =
`https://docs.googleapis.com/v1/documents/${documentId}`;
const response = await fetch(GET_DOC_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
Submitted by adam186 707 days ago
import * as wmill from "https://deno.land/x/windmill@v1.70.1/mod.ts";
export async function main(
gdocs_auth: wmill.Resource<"gdocs">,
documentId: string,
) {
const token = gdocs_auth["token"];
const GET_DOC_URL =
`https://docs.googleapis.com/v1/documents/${documentId}`;
const response = await fetch(GET_DOC_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
Submitted by adam186 742 days ago
import * as wmill from "https://deno.land/x/windmill@v1.23.0/mod.ts";
export async function main(
gdocs_auth: wmill.Resource<"gdocs">,
documentId: string,
) {
const token = gdocs_auth["token"];
const GET_DOC_URL =
`https://docs.googleapis.com/v1/documents/${documentId}`;
const response = await fetch(GET_DOC_URL, {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
Submitted by rossmccrann 958 days ago