@danielcraciun/drive-helpers
v1.0.2
Published
Google Drive Helpers
Downloads
2
Readme
Version 1.0.0
Drive Function:
Drive(client_email: string, pkey: string): drive_v3.Drive | null
Takes in your service account private key and service account email to authenticate via GoogleAuth.
getNamesAndLinks Function:
async getNamesAndLinks(drive: drive_v3.Drive, ...folders: string[]) : Promise<Files | null>
This function explores the folder tree until it reaches the root folder, then returns the links and names for each file.
Here is the Files type for your reference:
type Files = {
name: string
link: string
}[]