2017 © Pedro Peláez
 

library immutio

PHP api wrapper for immut.io

image

turanct/immutio

PHP api wrapper for immut.io

  • Thursday, July 30, 2015
  • by turanct
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ImmutioPHP

A PHP wrapper for the immut.io API., (*1)

Usage

Installing it is easy, just require turanct/immutio as a dependency in your composer.json file. You'll also need one of the transports (e.g. BuzzTransport). If you use one of the existing transport packages, you should only require that package, it will include this one automatically., (*2)

{
    "require-dev": {
        "turanct/immutio": "dev-master"
    }
}

To create a blob on immut.io, do this:, (*3)

<?php

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

$browser = new Buzz\Browser();
$transport = new Immutio\BuzzTransport($browser);
$client = new Immutio\Client($transport);

$blob = new Immutio\Blob(
    '{"ramsamsam": "bla", "foo": "bar", "baz": true, "qux": 1}',
    'application/json'
);

$blobId = $client->sendBlob($blob);
var_dump($blobId);

To retreive a blob, do this:, (*4)

<?php

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

$browser = new Buzz\Browser();
$transport = new Immutio\BuzzTransport($browser);
$client = new Immutio\Client($transport);

$blob = $client->retrieveBlob($blobId);

Contributing

Feel free to fork and send pull requests!, (*5)

License

This library is distributed under the MIT license., (*6)

The Versions

30/07 2015

dev-master

9999999-dev http://github.com/turanct/immutio

PHP api wrapper for immut.io

  Sources   Download

MIT

03/06 2015

1.0.0

1.0.0.0 http://github.com/turanct/immutio

PHP api wrapper for immut.io

  Sources   Download

MIT