public function createCollection($channelIdentifier, $title, $accessToken)
    {
        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if (!is_numeric($channelIdentifier)) {
            throw new InvalidIdentifierException('channel');
        }

        if (!is_string($title)) {
            throw new InvalidTypeException('Title', 'string', gettype($title));
        }

        $params = [
            'title' => $title,
        ];

        return $this->post(sprintf('channels/%s/collections', $channelIdentifier), $params, $accessToken);
    }
public function createCollection($channelIdentifier, $title, $accessToken)
    {
        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if (!is_numeric($channelIdentifier)) {
            throw new InvalidIdentifierException('channel');
        }

        if (!is_string($title)) {
            throw new InvalidTypeException('Title', 'string', gettype($title));
        }

        $params = [
            'title' => $title,
        ];

        return $this->post(sprintf('channels/%s/collections', $channelIdentifier), $params, $accessToken);
    }
public function createCollection ( $ channelIdentifier , $ title , $ accessToken ) { if ( ! $ this -> apiVersionIsGreaterThanV3 ( ) ) { throw new EndpointNotSupportedByApiVersionException ( ) ; } if ( ! is_numeric ( $ channelIdentifier ) ) { throw new InvalidIdentifierException ( 'channel' ) ; } if ( ! is_string ( $ title ) ) { throw new InvalidTypeException ( 'Title' , 'string' , gettype ( $ title ) ) ; } $ params = [ 'title' => $ title , ] ; return $ this -> post ( sprintf ( 'channels/%s/collections' , $ channelIdentifier ) , $ params , $ accessToken ) ; }
Create a new collection owned a channel

@param int|string $channelIdentifier
@param string     $title
@param string     $accessToken
@throws EndpointNotSupportedByApiVersionException
@throws InvalidIdentifierException
@throws InvalidTypeException
@return array|json
Create a new collection owned a channel