2017 © Pedro Peláez
 

library api

A PHP Wrapper for DockerCloud API

image

dockercloud/api

A PHP Wrapper for DockerCloud API

  • Saturday, February 17, 2018
  • by allansun
  • Repository
  • 3 Watchers
  • 9 Stars
  • 2,063 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 9 Versions
  • 25 % Grown

The README.md

DockerCloud API PHP Wrapper

This is a PHP FULL implementation of DockerCloud's API, (*1)

Minimum PHP Version Latest Stable Version Build Status Coverage Status Gitter, (*2)

Installation

Add a dependency on dockercloud/api to your project's composer.json by utilizing the [Composer](https://getcomposer .org/) package manager., (*3)

{
    "require-dev": {
        "dockercloud/api": "@stable"
    }
}

Usage instruction

Goto https://cloud.docker.com/account/#container-api-key to generate an API Key first., (*4)

Now you need to configure authentication credentials via a static method, (you only need to do this once)., (*5)

DockerCloud\Client::configure('username','apikey');

To get a list of services under your account:, (*6)

$API = new DockerCloud\API\Service();
$Response = $API->getList();
$MetaData = $Response->getMeta();
$services = $Response->getObjects();

To create a new service, (*7)

$Model = new DockerCloud\Model\Service();
$Model->setImageName('tutum/hello-world');

$API = new DockerCloud\API\Service();
$Model = $API->create($Model);

API Implementations

This API Wrapper implements all API endpoints currently provided by DockerCloud, for full documentation on how to use it please refere to API, (*8)

The Versions