예제 #1
0
 /**
  * @param Client             $client
  * @param MessageInterface   $message
  * @param RecipientInterface $recipient
  */
 private function sendRoomNotification(Client $client, MessageInterface $message, RecipientInterface $recipient)
 {
     $hcMessage = new Message();
     $hcMessage->setMessage($message->hipchat_message);
     $hcMessage->setColor(isset($message->hipchat_color) ? $message->hipchat_color : $this->getMessageColor());
     $hcMessage->setMessageFormat(isset($message->hipchat_format) ? $message->hipchat_format : $this->getMessageFormat());
     $hcMessage->setNotify(isset($message->hipchat_notify) ? $message->hipchat_notify : $this->getMessageNotify());
     $roomApi = new RoomAPI($client);
     $roomApi->sendRoomNotification($recipient->hipchat_room, $hcMessage);
 }
예제 #2
0
 /**
  * @return array
  */
 public function getAllRooms()
 {
     $client = $this->setupClient();
     $roomApi = new RoomAPI($client);
     return $roomApi->getRooms();
 }