Many Cloud is an open source utility that creates an interface for many cloud platforms found online that, after authentication, abstracts out which cloud service you are manipulating for the sake of simplicity. Many Cloud keeps things simple by automatically refreshing OAuth2 tokens and by providing an object-oriented approach to dealing with Files and Folders.
Steps to use: Firstly, you need to authenticate with whatever cloud services you will be using. For more information, see the authentication docs. Here is an example for authenticating with Google Drive:
//Initial authenticationlet connection =authentication_token: authentication_tokenredirect_uri: redirect_uri;//Future authenticationlet connection =access_token: access_tokenexpiry_date: expiry_daterefresh_token: refresh_tokentoken_type: "Bearer"force_reset: true //Optionally forces a refresh of the access token;
//Require the folder abstractionconst Folder = ;//Get the root folder of our connection (to any of the supported drives)let root_folder = "root" connection;//List the files in the root folder//This will return an array of File and Folder abstractionslet file_list = await root_folder;//Download all of the files in the root folder (but not the folders)forlet i = 0; i < file_listlength; i++iffile_listitype === 'file'let name = await file_listi;await file_listi;
Supported Cloud Services
|More to come!|