johnsn/drizzle

A Docker API library built on top of Guzzle.

dev-master 2013-10-20 10:02 UTC

This package is not auto-updated.

Last update: 2024-11-18 16:37:38 UTC


README

Stable: Build Status Dev: Build Status

A simple docker remote api built for packagist ontop of guzzle.

Example

<?php

require_once __DIR__ . "/vendor/autoload.php";

use Johnsn\Drizzle\Drizzle;

//$endpoint = 'http://127.0.0.1:4243', $version = 'v1.6'
$drizzle = new Drizzle();
$drizzle->connect();

//Return the current docker version
$data = $drizzle->version();

/**
 * $data:
 * array(2) {
 *   ["status"]=>
 *   int(200)
 *   ["data"]=>
 *   array(3) {
 *     ["Version"]=>
 *     string(5) "0.6.4"
 *     ["GitCommit"]=>
 *     string(7) "2f74b1c"
 *     ["GoVersion"]=>
 *     string(7) "go1.1.2"
 *   }
 * }
 */

var_dump($data);