This package is used to interact with the MongoHQ provider API. As the API evolves, this package will cover the new methods provided. Currently we can only add and delete databases using the MongoHQ API.
- PHP 5.3.x
- PECL HTTP
Here are a few methods covered by this API wrapper.
<?php
require_once 'Orchestra/Services/Mongohq.php';
use orchestra\services\Mongohq;
$svc = new Mongohq('XXX', 'YYY');
$response = $svc->add(array(
'plan' => 'free',
'app_id' => 'some-application-name',
'callback_url' => 'https://my.service.com'
));
echo $response->config->MONGOHQ_URL . PHP_EOL;
echo $response->id;
?>
<?php
require_once 'Orchestra/Services/Mongohq.php';
use orchestra\services\Mongohq;
$svc = new Mongohq('XXX', 'YYY');
$response = $svc->delete('some-id');
var_dump($response);
?>
This is released under the New BSD license. Should you require a copy of the license, it is included in this very repository.
Orchestra Platform Ltd. 2011