shared-drive
v0.0.16
Published
Shared drive controller
Downloads
59
Readme
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);
