public function updateCommunity($communityId, $accessToken, $summary = null, $description = null, $rules = null, $email = null)
    {
        $params = [];

        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if ($summary) {
            if (strlen($summary) > 160) {
                throw new InvalidParameterLengthException('summary');
            }
            $params['summary'] = $summary;
        }

        if ($description) {
            if (strlen($description) > 1572864) { // 1.5MB
                throw new InvalidParameterLengthException('description');
            }
            $params['description'] = $description;
        }

        if ($rules) {
            if (strlen($rules) > 1572864) { // 1.5MB
                throw new InvalidParameterLengthException('rules');
            }
            $params['rules'] = $rules;
        }

        if ($email) {
            if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
                throw new InvalidEmailAddressException();
            }
            $params['email'] = $email;
        }

        return $this->put(sprintf('communities/%s', $communityId), $params, $accessToken);
    }
public function updateCommunity($communityId, $accessToken, $summary = null, $description = null, $rules = null, $email = null)
    {
        $params = [];

        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if ($summary) {
            if (strlen($summary) > 160) {
                throw new InvalidParameterLengthException('summary');
            }
            $params['summary'] = $summary;
        }

        if ($description) {
            if (strlen($description) > 1572864) { // 1.5MB
                throw new InvalidParameterLengthException('description');
            }
            $params['description'] = $description;
        }

        if ($rules) {
            if (strlen($rules) > 1572864) { // 1.5MB
                throw new InvalidParameterLengthException('rules');
            }
            $params['rules'] = $rules;
        }

        if ($email) {
            if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
                throw new InvalidEmailAddressException();
            }
            $params['email'] = $email;
        }

        return $this->put(sprintf('communities/%s', $communityId), $params, $accessToken);
    }
public function updateCommunity ( $ communityId , $ accessToken , $ summary = null , $ description = null , $ rules = null , $ email = null ) { $ params = [ ] ; if ( ! $ this -> apiVersionIsGreaterThanV3 ( ) ) { throw new EndpointNotSupportedByApiVersionException ( ) ; } if ( $ summary ) { if ( strlen ( $ summary ) > 160 ) { throw new InvalidParameterLengthException ( 'summary' ) ; } $ params [ 'summary' ] = $ summary ; } if ( $ description ) { if ( strlen ( $ description ) > 1572864 ) { // 1.5MB throw new InvalidParameterLengthException ( 'description' ) ; } $ params [ 'description' ] = $ description ; } if ( $ rules ) { if ( strlen ( $ rules ) > 1572864 ) { // 1.5MB throw new InvalidParameterLengthException ( 'rules' ) ; } $ params [ 'rules' ] = $ rules ; } if ( $ email ) { if ( filter_var ( $ email , FILTER_VALIDATE_EMAIL ) === false ) { throw new InvalidEmailAddressException ( ) ; } $ params [ 'email' ] = $ email ; } return $ this -> put ( sprintf ( 'communities/%s' , $ communityId ) , $ params , $ accessToken ) ; }
Update a community

@param string $communityId
@param string $accessToken
@param string $summary
@param string $description
@param string $rules
@param string $email
@throws InvalidParameterLengthException
@throws EndpointNotSupportedByApiVersionException
@throws InvalidEmailAddressException
@return array|json
Update a community