ipalaus / sqwiggle-php-sdk
Unofficial Sqwiggle SDK for PHP.
v0.1.0
2014-02-28 00:11 UTC
Requires
- php: >=5.3.0
- guzzle/guzzle: 3.x
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-12-17 07:26:17 UTC
README
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.
Installation
Via Composer:
{ "require": { "ipalaus/sqwiggle-php-sdk": "0.1.*" } }
Usage
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);
Attachments
$client->getAttachment(3009); $client->updateAttachment(3009, array('description' => 'An awesome image.')); $client->removeAttachment(3009); $client->getAttachments();
Conversations
$client->getConversation(88732); $client->getConversations();
Information
$client->getInfo(); $client->getConfigurationInfo(); $client->getVersionsInfo();
Invites
$client->createInvite('isern@example.com'); $client->getInvite(16430); $client->removeInvite(16429); $client->getInvites();
Messages
$client->createMessage(4885, 'API posted message, yay!'); $client->getMessage(673750); $client->updateMessage(673780, 'Updated message :)'); $client->removeMessage(673780); $client->getMessages();
Organizations
$client->getOrganization(8579); $client->updateOrganization(8579, 'ipalaus'); $client->getOrganizations();
Rooms
$client->getRooms(); $client->createRoom('github'); $client->getRoom(4885); $client->updateRoom(5802, 'Isern'); $client->removeRoom(5800);
Users
$client->getUser(16898); $client->updateUser(16898, array('name' => 'Isern Palaus', 'message' => 'Hi, I am Isern.')); $client->getUsers();
Support
Bugs and feature request are tracked on GitHub.
Credits
License
This package is released under the MIT License. See the bundled LICENSE file for details.