Edits history of script submission #22388 for ' Search Shared Drives (gdrive)'

  • bunnative
    One script reply has been approved by the moderators
    Ap­pro­ved
    //native
    
    type Gdrive = {
      token: string;
    };
    export async function main(gdrive_auth: 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 hugo989 4 days ago