public function updateForumTopic($topicID, $data = [])
    {
        $validator = \Validator::make($data, [
            "forum" => "numeric",
            "author"      => "numeric",
            "author_name" => "required_if:author,0|string",
            "title" => "string",
            "post" => "string",
            "prefix" => "string",
            "tags"        => "string|is_csv_alphanumeric",
            "date"        => "date_format:YYYY-mm-dd H:i:s",
            "ip_address"  => "ip",
            "locked"      => "in:0,1",
            "open_time"   => "date_format:YYYY-mm-dd H:i:s",
            "close_time"  => "date_format:YYYY-mm-dd H:i:s",
            "hidden"      => "in:-1,0,1",
            "pinned"      => "in:0,1",
            "featured"    => "in:0,1",
        ], [
            "is_csv_alphanumeric" => "The :attribute must be a comma separated string.",
        ]);

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

        return $this->postRequest("forums/topics/" . $topicID, $data);
    }
public function updateForumTopic($topicID, $data = [])
    {
        $validator = \Validator::make($data, [
            "forum" => "numeric",
            "author"      => "numeric",
            "author_name" => "required_if:author,0|string",
            "title" => "string",
            "post" => "string",
            "prefix" => "string",
            "tags"        => "string|is_csv_alphanumeric",
            "date"        => "date_format:YYYY-mm-dd H:i:s",
            "ip_address"  => "ip",
            "locked"      => "in:0,1",
            "open_time"   => "date_format:YYYY-mm-dd H:i:s",
            "close_time"  => "date_format:YYYY-mm-dd H:i:s",
            "hidden"      => "in:-1,0,1",
            "pinned"      => "in:0,1",
            "featured"    => "in:0,1",
        ], [
            "is_csv_alphanumeric" => "The :attribute must be a comma separated string.",
        ]);

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

        return $this->postRequest("forums/topics/" . $topicID, $data);
    }
public function updateForumTopic ( $ topicID , $ data = [ ] ) { $ validator = \ Validator :: make ( $ data , [ "forum" => "numeric" , "author" => "numeric" , "author_name" => "required_if:author,0|string" , "title" => "string" , "post" => "string" , "prefix" => "string" , "tags" => "string|is_csv_alphanumeric" , "date" => "date_format:YYYY-mm-dd H:i:s" , "ip_address" => "ip" , "locked" => "in:0,1" , "open_time" => "date_format:YYYY-mm-dd H:i:s" , "close_time" => "date_format:YYYY-mm-dd H:i:s" , "hidden" => "in:-1,0,1" , "pinned" => "in:0,1" , "featured" => "in:0,1" , ] , [ "is_csv_alphanumeric" => "The :attribute must be a comma separated string." , ] ) ; if ( $ validator -> fails ( ) ) { $ message = head ( array_flatten ( $ validator -> messages ( ) ) ) ; throw new Exceptions \ InvalidFormat ( $ message ) ; } return $ this -> postRequest ( "forums/topics/" . $ topicID , $ data ) ; }
Update a forum topic with the given ID.

@param integer $topicID The ID of the topic to update.
@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 topic with the given ID .