public function roomHistoryAction()
 {
     $room = $this->params('room');
     $date = $this->params('date', 'recent');
     try {
         $messages = $this->hipchat->get_rooms_history($room, $date);
         foreach ($messages as $message) {
             $this->console->writeLine($message->from->name . ', ' . $message->date, Color::BLACK, Color::WHITE);
             $this->console->writeLine($message->message);
         }
     } catch (Exception $e) {
         $this->console->writeLine(sprintf('Room\'s history did not fetch: "%s"', $e->getMessage()), Color::RED);
     }
 }
Esempio n. 2
0
 public function getRoomsHistory($date = 'recent')
 {
     $this->checkRoom();
     return $this->hipchat->get_rooms_history($this->room, $date);
 }