type Gdrive = {
token: string;
};
export async function main(
gdrive_auth: Gdrive,
requestId: string,
drive_name: string,
) {
const supportsAllDrives = true;
const CREATE_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?requestId=${requestId}`;
const token = gdrive_auth["token"];
const body = {
name: drive_name,
};
const response = await fetch(CREATE_SHARED_DRIVE_URL, {
method: "POST",
body: JSON.stringify(body),
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
Submitted by hugo697 223 days ago
type Gdrive = {
token: string;
};
export async function main(
gdrive_auth: Gdrive,
requestId: string,
drive_name: string,
) {
const supportsAllDrives = true;
const CREATE_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?requestId=${requestId}`;
const token = gdrive_auth["token"];
const body = {
name: drive_name,
};
const response = await fetch(CREATE_SHARED_DRIVE_URL, {
method: "POST",
body: JSON.stringify(body),
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
Submitted by admin 855 days ago
type Gdrive = {
token: string;
};
export async function main(
gdrive_auth: Gdrive,
requestId: string,
drive_name: string,
) {
const supportsAllDrives = true;
const CREATE_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?requestId=${requestId}`;
const token = gdrive_auth["token"];
const body = {
"name": drive_name
};
const response = await fetch(CREATE_SHARED_DRIVE_URL, {
method: "POST",
body: JSON.stringify(body),
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
} Submitted by admin 859 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
export async function main(
gdrive_auth: wmill.Resource<"gdrive">,
requestId: string,
drive_name: string,
) {
const supportsAllDrives = true;
const CREATE_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?requestId=${requestId}`;
const token = gdrive_auth["token"];
const body = {
"name": drive_name
};
const response = await fetch(CREATE_SHARED_DRIVE_URL, {
method: "POST",
body: JSON.stringify(body),
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
} Submitted by adam186 987 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
export async function main(
gdrive_auth: wmill.Resource<"gdrive">,
requestId: string,
drive_name: string,
) {
const supportsAllDrives = true;
const CREATE_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?requestId=${requestId}`;
const token = gdrive_auth["token"];
const body = {
"name": drive_name
};
const response = await fetch(CREATE_SHARED_DRIVE_URL, {
method: "POST",
body: JSON.stringify(body),
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
} Submitted by adam186 1022 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
export async function main(
gdrive_auth: wmill.Resource<"gdrive">,
requestId: string,
drive_name: string,
) {
const supportsAllDrives = true;
const CREATE_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?requestId=${requestId}`;
const token = gdrive_auth["token"];
const body = {
"name": drive_name
};
const response = await fetch(CREATE_SHARED_DRIVE_URL, {
method: "POST",
body: JSON.stringify(body),
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
} Submitted by rossmccrann 1238 days ago