Beispiel #1
0
 public function setRoomTopic($room_id, $topic, $from = null)
 {
     $args = array('room_id' => $room_id, 'topic' => utf8_encode($topic));
     if ($from) {
         $args['from'] = utf8_encode($from);
     }
     $response = $this->client->make_request("rooms/topic", $args, 'POST');
     $this->checkError($response);
     return $response->status == 'ok';
 }
Beispiel #2
0
 /**
  * Delete a user.
  *
  * @url https://www.hipchat.com/docs/apiv2/method/delete_user
  *
  * @param $user_id_or_email
  *
  * @return bool
  */
 public function deleteUser($user_id_or_email)
 {
     $response = $this->client->make_request('user/' . $user_id_or_email, array(), 'DELETE');
     $this->checkError($response);
     return $response->status == 'OK';
 }