Nominal Pizza Masticator

    hidden-drive

    0.1.0 • Public • Published

    Hidden Drive

    Sharing files by link is surprisingly easy to enable by accident.

    This tool strips the anyoneWithLink permission from files in Google Drive.

    Installation

    npm install googleapis hidden-drive

    Usage

    const {google} = require('googleapis');
    const hidden   = require('hidden-drive');
     
    // Create Google Drive API client
    const client = google.drive({version: 'v3', auth: 'your-auth-token'});
    const drive  = hidden.drive(client);
     
    // Filter file(s)
    drive.filter((x) => x.id !== 'some-file-ID');
     
    // Hide all files in a particular folder
    drive.hide({q: `'${myFolderId}' in parents`});
     
    // Hide all files
    drive.hide({pageSize: 25}).then(console.log);
     
    // `hide()` accepts same options as https://developers.google.com/drive/api/v3/reference/files/list

    Install

    npm i hidden-drive

    DownloadsWeekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    6.57 kB

    Total Files

    6

    Last publish

    Collaborators

    • amancevice