Unofficial Sqwiggle SDK for PHP.
This package is compliant with PSR-0, PSR-1, and PSR-2. If you notice compliance oversights, please send a patch via pull request.
Via Composer:
{
"require": {
"ipalaus/sqwiggle-php-sdk": "0.1.*"
}
}
To use the Sqwiggle PHP SDK you need to authenticate to the Sqwiggle API using your access
token, which is passed via HTTP Based Authentication. A BasicAuthentication
class is provided in
order to ease the process.
use Ipalaus\Sqwiggle\Client;
use Ipalaus\Sqwiggle\BasicAuthentication;
$auth = new BasicAuthentication('access_token');
$client = new Client($auth);
$client->getAttachment(3009);
$client->updateAttachment(3009, array('description' => 'An awesome image.'));
$client->removeAttachment(3009);
$client->getAttachments();
$client->getConversation(88732);
$client->getConversations();
$client->getInfo();
$client->getConfigurationInfo();
$client->getVersionsInfo();
$client->createInvite('isern@example.com');
$client->getInvite(16430);
$client->removeInvite(16429);
$client->getInvites();
$client->createMessage(4885, 'API posted message, yay!');
$client->getMessage(673750);
$client->updateMessage(673780, 'Updated message :)');
$client->removeMessage(673780);
$client->getMessages();
$client->getOrganization(8579);
$client->updateOrganization(8579, 'ipalaus');
$client->getOrganizations();
$client->getRooms();
$client->createRoom('github');
$client->getRoom(4885);
$client->updateRoom(5802, 'Isern');
$client->removeRoom(5800);
$client->getUser(16898);
$client->updateUser(16898, array('name' => 'Isern Palaus', 'message' => 'Hi, I am Isern.'));
$client->getUsers();
Bugs and feature request are tracked on GitHub.
This package is released under the MIT License. See the bundled LICENSE file for details.