2017 © Pedro Peláez
 

library php-rgw-api

PHP Client for the Rados Gateway API that doesn't suck

image

myena/php-rgw-api

PHP Client for the Rados Gateway API that doesn't suck

  • Tuesday, June 26, 2018
  • by dcarbone
  • Repository
  • 4 Watchers
  • 0 Stars
  • 165 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

php-rgw-api

This lib aims to be a comprehensive PHP SDK for the Rados Gateway Admin API., (*1)

Installation

This lib is designed to be installed using Composer, (*2)

{
  "require": {
    "myena/php-rgw-api": "4.*"
  }
}

Features

  1. All object-containing responses are modeled (list)
  2. Entire request chain is fully modeled, with required parameters being type-hinted (e.g. UserRootLink::Info)
  3. All models have full swagger-php markup
  4. Includes undocumented /metadata endpoints
  5. Parameter validation (link) with hopefully useful error messages

Usage Basics

More details on each component can be found below, however here is a quick fill-in-the-blank example:, (*3)

$config = new \MyENA\RGW\Config([
    'address'   => '',
    'adminPath' => '',
    'apiKey'    => '',
    'apiSecret' => '',
]);
$client = new \MyENA\RGW\Client($config, new \MyENA\RGW\Signature\V2Signature());

[$users, $err] = $client->Metadata()->User()->List()->execute();
if (null !== $err) {
    die((string)$err);
}
var_dump($users);

// and whatever else you wanna do...

Advanced Config

You must first construct a Config:, (*4)

$config = new \MyENA\RGW\Config([
    'address'   => '',  // REQUIRED
    'apiKey'    => '',  // REQUIRED
    'apiSecret' => '',  // REQUIRED

    'adminPath'     => '',  // optional, whatever your admin ops path is

    'silent' => false // optional, silences all logging
]);

Custom Guzzle Client

The optional 2nd argument in the Config constructor accepts any object implementing the Guzzle ClientInterface. If left null, a new Guzzle Client with no options will be constructed., (*5)

Custom Logger

The optional 3rd argument in the Config constructor accepts any object implementing the Psr LoggerInterface. If left null, a new Psr NullLogger will be constructed., (*6)

The Versions

26/06 2018

dev-master

9999999-dev

PHP Client for the Rados Gateway API that doesn't suck

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Daniel Carbone

19/06 2018

2.0.1

2.0.1.0

PHP Client for the Rados Gateway API that doesn't suck

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Daniel Carbone

19/06 2018

2.0.0

2.0.0.0

PHP Client for the Rados Gateway API that doesn't suck

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Daniel Carbone

15/06 2018

1.0.2

1.0.2.0

PHP Client for the Rados Gateway API that doesn't suck

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Daniel Carbone

14/06 2018

1.0.1.1

1.0.1.1

PHP Client for the Rados Gateway API that doesn't suck

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Daniel Carbone

14/06 2018

1.0.1

1.0.1.0

PHP Client for the Rados Gateway API that doesn't suck

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Daniel Carbone

14/06 2018

1.0.0

1.0.0.0

PHP Client for the Rados Gateway API that doesn't suck

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Daniel Carbone