Page MenuHomePhabricator
Paste P1725

HipChatClient
ActivePublic

Authored by joshuaspence on Feb 16 2015, 8:46 PM.
Tags
None
Referenced Files
F307422: HipChatClient
Feb 16 2015, 8:46 PM
Subscribers
None
class HipChatClient {
private function makeRequest(
$api_method,
$args = array(),
$http_method = 'GET') {
$args['auth_token'] = $this->authToken;
$args['format'] = 'json';
$future = id(new HTTPSFuture($this->apiTarget.$api_method, $args))
->setMethod($http_method);
list($response, $data, $headers) = $future->resolvex();
return phutil_json_decode($data, true);
}
}

Event Timeline

joshuaspence changed the title of this paste from untitled to HipChatClient.
joshuaspence updated the paste's language from autodetect to autodetect.