2017 © Pedro Peláez
 

library sharefile-api-with-download

A minimal implementation of ShareFile Api

image

dream-encode/sharefile-api-with-download

A minimal implementation of ShareFile Api

  • Thursday, September 21, 2017
  • by dream-encode
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

A minimal implementation of the ShareFile Api

This is a minimal PHP implementation of the ShareFile API. It contains only the methods needed for my flysystem-sharefile adapter. I am open to PRs that add extra methods to the client., (*1)

Here are a few examples on how you can use the package:, (*2)

// Connect to ShareFile
$client = new Client('hostname', 'client_id', 'secret', 'username', 'password');

// Create a folder
$newFolder = $client->createFolder($parentId, $name, $description);

// Upload a file in that folder 
$client->uploadFileStandard($filename, $newFolder['Id']);

// Get details for a file using filepath
$picture = $client->getItemByPath('/Personal Folders/Pictures/Picture.jpg');

// Get a thumbnail of a file
$client->getThumbnailUrl($picture['Id']);

Installation

You can install the package via composer: ``` bash composer require dream-encode/sharefile-api, (*3)


## Usage The first thing you need to do is get an OAuth2 key. Go to the [Get an API key](https://api.sharefile.com/rest/oauth2-request.aspx) section on the [ShareFile API site](https://api.sharefile.com/) to get this key. With an OAuth2 key you can instantiate a `DreamEncode\Sharefile\Client`: ```php $client = new Client('hostname', 'client_id', 'secret', 'username', 'password');

Look in the source code of DreamEncode\ShareFile\Client to discover the methods you can use. More examples can be found in the source code of DreamEncode\ShareFile\Test\TestShareFileApi., (*4)

Changelog

Please see CHANGELOG for more information what has changed recently., (*5)

Testing

In the /tests-folder are two tests defined: - TestClient.php tests the DreamEncode\Sharefile\Client-class using mock Guzzle objects; - TestShareFileApi.php tests the DreamEncode\Sharefile\Client-class using the live ShareFile API. To use this test fill in your ShareFile credentials under section <PHP> of the phpunit.xml.dist-file in the project root folder. Some tests need additional parameters to run. These parameters can be found in the first lines of the test., (*6)

Security

If you discover any security related issues, please email david@dream-encode.com instead of using the issue tracker., (*7)

License

The MIT License (MIT). Please see License File for more information., (*8)

The Versions

21/09 2017

dev-master

9999999-dev https://github.com/dream-encode/sharefile-api-with-download

A minimal implementation of ShareFile Api

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sharefile-api sharefile dream-encode

14/09 2017

1.1.0

1.1.0.0 https://github.com/kapersoft/sharefile-api

A minimal implementation of ShareFile Api

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sharefile-api sharefile kapersoft

11/09 2017

1.0.1

1.0.1.0 https://github.com/kapersoft/sharefile-api

A minimal implementation of ShareFile Api

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sharefile-api sharefile kapersoft

31/08 2017

1.0.0

1.0.0.0 https://github.com/kapersoft/sharefile-api

A minimal implementation of ShareFile Api

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sharefile-api sharefile kapersoft