コード例 #1
0
ファイル: TalkApi.php プロジェクト: xsist10/joindin-web2
 /**
  * Add a comment
  *
  * @param TalkEntity $talk
  * @param int $rating
  * @param string $comment
  */
 public function addComment($talk, $rating, $comment)
 {
     $uri = $talk->getCommentsUri();
     $params = array('rating' => $rating, 'comment' => $comment);
     list($status, $result) = $this->apiPost($uri, $params);
     if ($status == 201) {
         return true;
     }
     throw new \Exception("Failed to add comment: " . $result);
 }