public function updateForumPost($postId, $data = [])
    {
        $validator = \Validator::make($data, [
            "author"      => "numeric",
            "author_name" => "required_if:author,0|string",
            "post"        => "string",
            "hidden"      => "in:-1,0,1",
        ]);

        if ($validator->fails()) {
            $message = head(array_flatten($validator->messages()));
            throw new Exceptions\InvalidFormat($message);
        }

        return $this->postRequest("forums/posts/" . $postId, $data);
    }
public function updateForumPost($postId, $data = [])
    {
        $validator = \Validator::make($data, [
            "author"      => "numeric",
            "author_name" => "required_if:author,0|string",
            "post"        => "string",
            "hidden"      => "in:-1,0,1",
        ]);

        if ($validator->fails()) {
            $message = head(array_flatten($validator->messages()));
            throw new Exceptions\InvalidFormat($message);
        }

        return $this->postRequest("forums/posts/" . $postId, $data);
    }
public function updateForumPost ( $ postId , $ data = [ ] ) { $ validator = \ Validator :: make ( $ data , [ "author" => "numeric" , "author_name" => "required_if:author,0|string" , "post" => "string" , "hidden" => "in:-1,0,1" , ] ) ; if ( $ validator -> fails ( ) ) { $ message = head ( array_flatten ( $ validator -> messages ( ) ) ) ; throw new Exceptions \ InvalidFormat ( $ message ) ; } return $ this -> postRequest ( "forums/posts/" . $ postId , $ data ) ; }
Update a forum post with the given ID.

@param $postId
@param array $data The data to edit.

@return mixed
@throws Exceptions\InvalidFormat
@throws Exceptions\IpboardMemberEmailExists
@throws Exceptions\IpboardMemberInvalidGroup
@throws Exceptions\IpboardMemberUsernameExists
@throws IpboardInvalidApiKey
@throws IpboardMemberIdInvalid
@throws IpboardThrottled
@throws \Exception
Update a forum post with the given ID .