#Hipchat v2 Api Client
PHP Library to process calls to Hipchat's v2 REST API
This package is work in progress and some functionality is not available yet.
##Installation
The recommended way to install Hipchatv2ApiClient is through Composer. To install this library, run the command below and you will get the latest version:
composer require gorkalaucirica/hipchat-v2-api-client
##Usage
All queries need the following two lines. The first one is to authenticate yourself and the second one creates a
client that is used by the API classes to perform requests to the API. That is enough to start, now check the API calls
section to see how to use the $client
to send requests to the API.
use GorkaLaucirica\HipchatAPIv2Client\Auth\OAuth2;
use GorkaLaucirica\HipchatAPIv2Client\Client;
$auth = new OAuth2('tokenYouCanGetInHipchatSite');
$client = new Client($auth);
##API calls
All API call methods are located in the API folder. All of them have been documented and all have a link to Hipchat v2 API documentation. Some examples:
####Getting user by mention name:
use GorkaLaucirica\HipchatAPIv2Client\API\UserAPI;
$userAPI = new UserAPI($client);
$user = $userAPI->getUser('@gorkalaucirica');
####Getting all rooms
use GorkaLaucirica\HipchatAPIv2Client\API\RoomAPI;
$roomAPI = new RoomAPI($client);
$room = $roomAPI->getRooms(array('max-results' => 30));
##Current status
The following list shows methods available and missing:
####Add ons
- Get addon installable data
####Capabilities
- Get capabilities
####Emoticons
- Get all emoticons
- Get emoticon
####OAuth Sessions
- Delete session
- Get session
- Generate token
####Rooms
- Create room
- Get all rooms
- Send room notification redirect
- Send room notification
- Update room
- Get room
- Delete room
- Create webhook
- Get all webhooks
- Get room statistics
- Get all members
- Set topic
- Add member
- Remove member
- Delete webhook
- Get webhook
- View history
- Invite user
####Users
- Private message user
- Upload photo
- Delete photo
- Update user
- Delete user
- View user
- Create user
- Get all users