1
Search Shared Drives
One script reply has been approved by the moderators Verified
Created by rossmccrann 848 days ago Viewed 9513 times
0
Submitted by rossmccrann Deno
Verified 848 days ago
1
type Gdrive = {
2
  token: string;
3
};
4
export async function main(gdrive_auth: Gdrive) {
5
  const q = "";
6
  const SEARCH_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?q=${q}`;
7

8
  const token = gdrive_auth["token"];
9

10
  const response = await fetch(SEARCH_SHARED_DRIVE_URL, {
11
    method: "GET",
12
    headers: {
13
      Authorization: "Bearer " + token,
14
      "Content-Type": "application/json",
15
    },
16
  });
17

18
  return await response.json();
19
}
20