@toba/google-drive

Toba Google Drive module

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
01Oct 20, 2020Mar 5, 2018Minified + gzip package size for @toba/google-drive in KB

Readme

npm package Build Status Code style Dependencies DevDependencies codecov

Usage

yarn add @toba/google-drive
const config: ClientConfig = {
   apiKey: process.env['GOOGLE_DRIVE_KEY'],
   folderID: 'some folder ID',
   useCache: false,
   cacheSize: 0,
   auth: {
      clientID: process.env['GOOGLE_CLIENT_ID'],
      secret: process.env['GOOGLE_SECRET'],
      callback: 'http://localhost/auth/google',
      token: {
         type: null,
         access: process.env['GOOGLE_ACCESS_TOKEN'],
         accessExpiration: null as Date,
         refresh: process.env['GOOGLE_REFRESH_TOKEN']
      }
   } as AuthConfig
};
const client = new Client(config);
const text = await client.readFileWithName('myfile.txt');

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.