Giter VIP home page Giter VIP logo

flysystem-sharefile's Introduction

Flysystem adapter for Citrix ShareFile

Latest Version on Packagist Build Status StyleCI Quality Score Total Downloads

This package contains a Flysystem adapter for Citrix ShareFile. Under the hood my Sharefile API package is used.

Installation

You can install the package via composer:

composer require kapersoft/flysystem-sharefile

Usage

The first thing you need to do is get an OAuth2 key. Go to the Get an API key section on the ShareFile API site to get this key.

With an OAuth2 key you can instantiate a Kapersoft\Sharefile\Client and setup the Flysystem adapter:

use League\Flysystem\Filesystem;
use Kapersoft\Sharefile\Client;
use Kapersoft\FlysystemSharefile\SharefileAdapter;

$client = new Client('hostname', 'client_id', 'secret', 'username', 'password');

$adapter = new SharefileAdapter($client);

$filesystem = new Filesystem($adapter);

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

In the /tests-folder are two tests defined

  • SharefileAdapterTest.php
  • SharefileAdapterFunctionalTest.php

To start both tests type in your terminal:

composer test

SharefileAdapterTest.php tests the Kapersoft\FlysystemSharefile\SharefileAdapter-class using phpspec prophecy and mock objects.

SharefileAdapterFunctionalTest.php is a set of functional tests using an online ShareFile drive . To enable this test, fill in your ShareFile credentials under section <PHP> of the phpunit.xml.dist-file in the project root folder. Each test will create the folder named Flysystem-sharefile-test in your personal ShareFile drive for storing temporary test-files. When the test is completed, the Flysystem-sharefile-test-folder will be removed. A WebDav connection to your ShareFile drive is used to assert all tests. Note: Make sure WebDav is enabled for your ShareFile account (see https://support.citrix.com/article/CTX207863 for more information).

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.