index.js
function (id, width, height, options, callback) {
            var args = arguments,
                url,
                query,
                retry = false,
                params,
                handler;

            if (typeof options === 'function') {
                callback = options;
            } else {
                options = extend({}, options);
                retry = options.retry;
            }

            retry = (retry === true) && function () {
                this.getThumbnail.apply(this, args);
            }.bind(this);

            params = {
                width: width,
                height: height
            };

            handler = createResponseHandler(callback, [200, 202], true, retry);

            query = querystring.stringify(params);
            url = client.documentsURL + '/' + id + '/thumbnail?' + query;
            return req(url, handler);
        }
function (id, width, height, options, callback) {
            var args = arguments,
                url,
                query,
                retry = false,
                params,
                handler;

            if (typeof options === 'function') {
                callback = options;
            } else {
                options = extend({}, options);
                retry = options.retry;
            }

            retry = (retry === true) && function () {
                this.getThumbnail.apply(this, args);
            }.bind(this);

            params = {
                width: width,
                height: height
            };

            handler = createResponseHandler(callback, [200, 202], true, retry);

            query = querystring.stringify(params);
            url = client.documentsURL + '/' + id + '/thumbnail?' + query;
            return req(url, handler);
        }
function ( id , width , height , options , callback ) { var args = arguments , url , query , retry = false , params , handler ; if ( typeof options === 'function' ) { callback = options ; } else { options = extend ( { } , options ) ; retry = options . retry ; } retry = ( retry === true ) && function ( ) { this . getThumbnail . apply ( this , args ) ; } . bind ( this ) ; params = { width : width , height : height } ; handler = createResponseHandler ( callback , [ 200 , 202 ] , true , retry ) ; query = querystring . stringify ( params ) ; url = client . documentsURL + '/' + id + '/thumbnail?' + query ; return req ( url , handler ) ; }
Fetches a thumbnail for the given document id
@param   {string}   id               The document uuid
@param   {int}      width            The thumbnail width
@param   {int}      height           The thumbnail height
@param   {Object}   [options]        Content options
@param   {boolean}  [options.retry]  Whether to retry the request after 'retry-after' seconds if the retry-after header is sent
@param   {Function} [callback]       A callback to call with the response (or error)
@returns {Request}
Fetches a thumbnail for the given document id