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 468 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 471 days ago
import * as wmill from "https://deno.land/x/windmill@v1.85.0/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 599 days ago
import * as wmill from "https://deno.land/x/windmill@v1.70.1/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 634 days ago
import * as wmill from "https://deno.land/x/windmill@v1.24.1/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 850 days ago