run_small_dropbox 1.0.1 copy "run_small_dropbox: ^1.0.1" to clipboard
run_small_dropbox: ^1.0.1 copied to clipboard

Pacote simples para acesso a API do dropbox..

A simple package to access dropbox, using dart.

Features #

  • Move files from dropbox
  • Copy files from dropbox
  • Delete files from dropbox
  • Get a file link from dropbox
  • Refresh token
  • Create folder in dropbox
  • Upload file to dropbox

Getting started #

dart pub add run_small_dropbox

Usage #

NOTE: I initially created this package to help me with my applications, because I couldn't find a package that helped me work with dropbox using dart.

The package currently only provides 6 functionality; that of getting a temporary link to a file, creating a folder, moving, copying and deleting a file, uploading a file, getting or refring your token.

Well, follow the examples on how to use the package:

Well, the basics first. Import it:

import 'package:run_small_dropbox/run_small_dropbox.dart';

Get the temporary link of a file.

void main() {
   getTemporaryFileLink(commonParameter('token'), bodyParameterToAcquireTheTemporaryLink('/path/file'));
}

Create a new folder in your dropbox.

void main() {
   createFolder(commonParameter('token'), bodyParameterForFolderCreation('/my-new-folder'));
}

Copy a file.

void main() {
   copyFile(commonParameter('token'), bodyParameterToCopyFile('from-this-path', 'to-here-path'));
}

Delete a file.

void main() {
   deleteFile(commonParameter('token'), bodyParameterToDeleteFile('/path/file'));
}

Upload a file to dropbox. Load any binary file.

void main() {
   uploadFile(UploadFiles('token', 'up-to'), File(''));
}

Move the file.

void main() {
   moveFile(commonParameter('token'), bodyParameterToMoveFile('from-this-path', 'to-here-path'));
}

Get a new access token.

map apiconsole = {
   "refresh_token": "your refresh token",
   'appKey': 'your app key',
   'appSecret': 'your secret key',
};

class Authentication {
   static String appKey = apiconsole['appKey'];
   static String appSecret = apiconsole['appSecret'];
   static String refreshToken = apiconsole['refresh_token'];
}

void main() {
   refreshToken(refreshToken: Authentication.refreshToken, appKey: Authentication.appKey, secretKey: Authentication.appSecret);
}

Additional information #

Each of these functions returns a Response object. Use it as you please.

Good coding.

10
likes
120
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

Pacote simples para acesso a API do dropbox..

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http, http_parser, path

More

Packages that depend on run_small_dropbox