Giter Club home page Giter Club logo

hipchatapiv2client's Introduction

#Hipchat v2 Api Client

PHP Library to process calls to Hipchat's v2 REST API

Latest Stable Version Total Downloads Latest Unstable Version License Build Status Scrutinizer Code Quality SensioLabsInsight

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);

##Client for private instances

After version 1.5.0 you can set the URL in the constructor to change the base url used by the client (by default uses https://api.hipchat.com

$client = new Client($auth, null, 'https.//api.yourdomain.com');

##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
  • Create addon link
  • Invoke addon link
  • Delete addon link

####Capabilities

  • Get capabilities

####Emoticons

  • Get emoticon
  • Get all emoticons

####OAuth Sessions

  • Generate token
  • Get session
  • Delete session

####Rooms

  • Get all rooms
  • Create room
  • Get room
  • Update room
  • Delete room
  • Get avatar
  • Update avatar
  • Delete avatar
  • Get room message
  • View room history
  • View recent room history
  • Invite user
  • Add member
  • Remove member
  • Get all members
  • Send message
  • Send room notification
  • Get all participants
  • Reply to message
  • Share file with room
  • Get room statistics
  • Set topic
  • Get webhook
  • Delete webhook
  • Get all webhooks
  • Create webhook

####Users

  • Get all users
  • Create user
  • View user
  • Update user
  • Delete user
  • Get privatechat message
  • View recent privatechat history
  • Private message user
  • Get photo
  • Upload photo
  • Delete photo
  • Get auto join rooms
  • Share file with user
  • Share link with user

hipchatapiv2client's People

Contributors

acedude avatar amochohan avatar andypoorman avatar antoinelemaire avatar eleclerc avatar gorkalaucirica avatar josephblock avatar rounoff avatar tschuermans avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.