shared-drive
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

Shared Drive

This controller provides functionallity on top of common file sharing services to get access to public shared folders.

Google Drive

import { googledrive } from 'shared-drive'

const G_API_KEY = process.env.G_API_KEY as string // Google API Key

const result = await googledrive('https://drive.google.com/drive/folders/1HDb6vlmKHTmtRO5ChGQLEu-EunrkA67m?usp=sharing', {}, G_API_KEY);

console.log(result);

One Drive

import { onedrive } from 'shared-drive'

const MS_APP_AUTH = {
  clientId: process.env.MS_CLIENT_ID as string, // Client Id from registered app
  directoryId: process.env.MS_DIRECTORY_ID as string, // Directory Id from registered app
  clientSecret: process.env.MS_CLIENT_SECRET as string // Client Secret from registered app
}

const result = await onedrive('https://fellowblue-my.sharepoint.com/:f:/g/personal/maurice_fellow_blue/EgdHXq3SJclOpHhgrsJ168EBsQDNBkZBFlYZjxnzqQJQqw?e=7sdQax', {}, MS_APP_AUTH);

console.log(result);

Readme

Keywords

Package Sidebar

Install

npm i shared-drive

Weekly Downloads

0

Version

0.0.16

License

ISC

Unpacked Size

20.5 kB

Total Files

23

Last publish

Collaborators

  • mauriceconrad