Coder Social home page Coder Social logo

pittkost / php-ocsclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattmortek/php-ocsclient

0.0 2.0 0.0 158 KB

PHP library to communicate with Oktawave Cloud Storage

Home Page: oktawave.com

License: GNU General Public License v3.0

PHP 100.00%

php-ocsclient's Introduction

Oktawave - PHP OCS Client

php-ocsclient is a PHP library to communicate with Oktawave OCS.

Installation

Installing via Composer

The recommended way to install OCS Client is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add OCS Client dependency to your project
php composer.phar require oktawave/php-ocsclient:*

After installing, you need to require Composer's autoloader:

<?php

require_once 'vendor/autoload.php';

Standalone installation

  1. Download the neweset release
  2. Include initialization script in your code that loads all required classes
<?php

require_once 'path/to/ocs/ocs_init.php';

Usage

For all example cases of using client you should take a look at the example code from examples/OCSClient.php.

Authentication

To use OCS you must authenticate your account.

<?php
// Create new OSC Client instance for "somebucket" bucket
$OCSClient = new Oktawave_OCS_OCSClient('somebucket');

// Authenticate your OCS user
$OCSClient->authenticate('account:user', 'pa$$w0rd');

Objects manipulation

<?php
// Upload single object
$url = $OCSClient->createObject('/path/to/file.txt', 'destination/path/file.txt');

// Download object
$fileContent = $OCSClient->downloadObject('destination/path/file.txt');

//  Get a list of all objects
$list = $OCSClient->listObjects();

Copyright

Copyright (C) 2014 Oktawave Sp. z o.o. - oktawave.com

Released under GNU General Public License v3.0. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

php-ocsclient's People

Contributors

jsoroka-oktawave avatar

Watchers

 avatar  avatar

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.