drivequ v1.0.0
DriveQu SDK
By using open source SDK βοΈ οΈit allows you to connect & explore paid storage manager DriveQu via other apps (cross app). You can visit https://drivequ.herokuapp.com for trial use & get experience as a file explorer π€ in a restricted environment.
Table of Contents
Installation
Install using npm
$ npm i -S drivequ
... Or using yarn
$ yarn add drivequ
Usage π
// commonjs
const drivequ = require('drivequ');
// es modules
import drivequ from 'drivequ';
Set up Your Global Config
By purchasing our product, you can use your own host
address.
drivequ.init({
host: 'https://drivequ.herokuapp.com',
accessKeyId: '{access-key-id}',
});
Work With Your Files π
Upload file
By default, the files upload location
will be directed to the root folder.
You can upload files into the folder by filling in the location
based on the url of the folder you want to go to (Also applies to folders).
// single upload
await drivequ.file.upload({
file: req.file,
location: '/',
});
// multiples upload
await drivequ.file.upload({
files: req.file,
location: '/74487546-8574-40d5-8986...',
}, {
multiples : true,
});
Find Files
Junk files are placed separately from other files (Also applies to folders).
await drivequ.file.find({
location: '/',
trashed: false,
});
Delete Files
The delete
method requires an array parameter containing the id
of the files you want to delete.
await drivequ.file.delete(['6267f14cc458...']);
Work With Your Folders π
Create new folder
Folder name is unique if the location is the same.
await drivequ.folder.create({
name: 'Folder Name',
description: 'A description of your folder',
location: '/',
});
Find folders
await drivequ.folder.find({
location: '/5a462358-8881-42e1-83eb...',
});
Delete folders
The delete
method requires an array parameter containing the id
of the folder you want to delete.
await drivequ.folder.delete(['6265c71a08f8...']);
Contributing
Contributions make the open source community a great place to learn, inspire and create. I really appreciate every contribution you make.
If you have any suggestions that would make this even better, please fork this repo and pull request. You can also open an issue on this project and don't forget to give this project a star. Thank you.
- Fork this project
- Create a new branch -
git checkout -b branchName
- Commit your changes -
git commit -m "Add new features"
- Push to your branch -
git push origin branchName
- Submit a pull request
License π
Distributed under the GPL-3.0 License. See LICENSE.txt for more information.
Support Us π€
2 years ago