2017 © Pedro Peláez
 

library dropboxhelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

image

headoo/dropboxhelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  • Monday, October 30, 2017
  • by ka
  • Repository
  • 2 Watchers
  • 2 Stars
  • 110 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 13 Versions
  • 2 % Grown

The README.md

Build Status codecov Latest Stable Version License, (*1)

DropboxHelper

Minimalist helper to use the complete PHP SDK for Dropbox's v2 API Alorel/dropbox-v2-php. Simplifies at best the following uses at Dropbox: - read/write/delete a file - list a folder from the path - list the delta of a folder from the cursor - get account information of the connected account, (*2)

Installation

Via Composer ``` bash $ composer require headoo/dropboxhelper, (*3)


# Utilisation Load the helper: ```php

or, (*4)

setToken($yourAppDropboxToken);
?>

Write/Read/Delete a file:, (*5)

write('/Path/To/The/File', 'put your content here');
    $dropboxHelper->read('/Path/To/The/File');
    $dropboxHelper->delete('/Path/To/The/File');
?>

List a folder from the path:, (*6)

loadFolderPath('/Path/To/List');
    while ($oFolder && ($aMedia = $oFolder->next())) {
        if (DropboxHelper::isFolder($aMedia)) {
            echo $aMedia['name'] . ' is a folder';
        }
        if (DropboxHelper::isFile($aMedia)) {
            echo $aMedia['name'] . ' is a file';
        } 
    }
?>

List a folder from the cursor:, (*7)

loadFolderCursor('--this--is--the--last--cursor--of--the--folder--');
    while ($oFolder && ($aMedia = $oFolder->next())) {
        if (DropboxHelper::isFolder($aMedia)) {
            echo $aMedia['name'] . ' is a folder';
        }
        if (DropboxHelper::isFile($aMedia)) {
            echo $aMedia['name'] . ' is a file';
        }
    }
    
    echo "The last cursor of the folder is: " . $oFolder->getCursor();
?>

Unit Test

To test this project with PHPUnit, declare following environment variables:, (*8)

$ export DROPBOX_TOKEN="YourAppDropboxToken"
$ export DROPBOX_FOLDER_PATH="/Path/In/Your/Dropbox/To/Test"
$ export DROPBOX_FOLDER_CURSOR="Last cursor of the folder"

Then, launch PHPUnit:, (*9)

$ ./vendor/phpunit/phpunit/phpunit -c phpunit.xml

Links

The Versions

30/10 2017

dev-recette

dev-recette https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

27/10 2017

dev-cme-ut

dev-cme-ut https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

27/10 2017

dev-cme-bool-result

dev-cme-bool-result https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

29/08 2017

dev-ka-better-UT

dev-ka-better-UT https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

29/08 2017

0.1.5-alpha

0.1.5.0-alpha https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

31/05 2017

dev-master

9999999-dev https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

31/05 2017

0.1.4

0.1.4.0 https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

31/05 2017

0.1.3

0.1.3.0 https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

18/05 2017

0.1.2

0.1.2.0 https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

24/04 2017

0.1.1

0.1.1.0 https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

21/04 2017

0.1.0

0.1.0.0 https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

21/04 2017

0.0.5

0.0.5.0 https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox

21/04 2017

0.0.4

0.0.4.0 https://github.com/headoo/DropboxHelper

Minimalist Helper to use PHP SDK alorel/dropbox-v2-php

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk dropbox