PHP code example of silinternational / hipchat-php-client

1. Go to this page and download the library: Download silinternational/hipchat-php-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

silinternational / hipchat-php-client example snippets




use HipChat\UserClient;

$client = new UserClient([
  
]);

$user = $client->createUser([
    'name' => 'Test User',
    'mention_name' => 'TestUser',
    'email' => '[email protected]',
]);

var_dump($user);

array(4) {
  'entity' =>
  array(5) {
    'id' =>
    int(9876543)
    'links' =>
    array(1) {
      'self' =>
      string(42) "https => //api.hipchat.com/v2/user/9876543"
    }
    'mention_name' =>
    string(8) "TestUser"
    'name' =>
    string(9) "Test User"
    'version' =>
    string(8) "ZV8L9NOQ"
  }
  'id' =>
  int(9876543)
  'links' =>
  array(1) {
    'self' =>
    string(42) "https => //api.hipchat.com/v2/user/9876543"
  }
  'password' =>
  string(12) "DT5qi1ewkFw8"
}


"silinternational/hipchat-php-client": "dev-master"