Search... Ctrl + K

Search Shared Drives (gdrive)
One script reply has been approved by the moderators Verified

Created by rossmccrann 127 days ago Used 70 times 1 Point

No comments yet

Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
import * as wmill from "https://deno.land/x/windmill@v1.24.1/mod.ts";

export async function main(
    gdrive_auth: wmill.Resource<"gdrive">,
) {
    const q = "";
    const SEARCH_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?q=${q}`;

    const token = gdrive_auth["token"];

    const response = await fetch(SEARCH_SHARED_DRIVE_URL, {
        method: "GET",
        headers: {
            Authorization: "Bearer " + token,
            "Content-Type": "application/json",
        },
    });

    return await response.json();
}

Submitted by rossmccrann 127 days ago

Edited 109 days ago

No comments yet