Skip to content

Commit

Permalink
Merge pull request #3 from zerkms/master
Browse files Browse the repository at this point in the history
Due to my project needs added rooms/history endpoint support
  • Loading branch information
powdahound committed Sep 19, 2011
2 parents e8e834b + 9ddb663 commit 0900871
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions HipChat.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ public function message_room($room_id, $from, $message, $notify = false, $color
return ($response->status == 'sent');
}

/**
* Get chat history for a room
*
* @see https://www.hipchat.com/docs/api/method/rooms/history
*/
public function get_rooms_history($room_id, $date = 'recent') {
$response = $this->make_request('rooms/history', array(
'room_id' => $room_id,
'date' => $date
));
return $response->messages;
}

/////////////////////////////////////////////////////////////////////////////
// User functions
Expand Down

0 comments on commit 0900871

Please sign in to comment.