function createCollection(body) {
    return this.getJwt(this.apiToken)
        .then((response) => {
            this.jwt = response.body.token;

            return request({
                uri: `${this.instance}/${this.namespace}/collections`,
                method: 'POST',
                auth: {
                    bearer: this.jwt
                },
                body,
                json: true
            });
        });
}
/**
 * Helper function to create a collection
 * @method createCollection
 * @param   {Object}  body    The body of the request
 * @returns {Promise}
 */
Helper function to create a collection
@method createCollection
@param   {Object}  body    The body of the request
@returns {Promise}
Helper function to create a collection @method createCollection @param { Object } body The body of the request @returns { Promise }
function createCollection(body) {
    return this.getJwt(this.apiToken)
        .then((response) => {
            this.jwt = response.body.token;
            return request({
                uri: `${this.instance}/${this.namespace}/collections`,
                method: 'POST',
                auth: {
                    bearer: this.jwt
                },
                body,
                json: true
            });
        });
}
function createCollection ( body ) { return this . getJwt ( this . apiToken ) . then ( ( response ) => { this . jwt = response . body . token ; return request ( { uri : ` ${ this . instance } ${ this . namespace } ` , method : 'POST' , auth : { bearer : this . jwt } , body , json : true } ) ; } ) ; }
Helper function to create a collection
 @method createCollection
 @param   {Object}  body    The body of the request
 @returns {Promise}
Helper function to create a collection @method createCollection @param { Object } body The body of the request @returns { Promise }