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

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

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

            if (params['created_before']) {
                params['created_before'] = getTimestamp(params['created_before']);
            }

            if (params['created_after']) {
                params['created_after'] = getTimestamp(params['created_after']);
            }

            query = querystring.stringify(params);
            if (query) {
                query = '?' + query;
            }

            handler = createResponseHandler(callback, retry);

            return req(client.documentsURL + query, handler);
        }
function (options, callback) {
            var query,
                handler,
                retry = false,
                params,
                args = arguments;

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

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

            if (params['created_before']) {
                params['created_before'] = getTimestamp(params['created_before']);
            }

            if (params['created_after']) {
                params['created_after'] = getTimestamp(params['created_after']);
            }

            query = querystring.stringify(params);
            if (query) {
                query = '?' + query;
            }

            handler = createResponseHandler(callback, retry);

            return req(client.documentsURL + query, handler);
        }
function ( options , callback ) { var query , handler , retry = false , params , args = arguments ; if ( typeof options === 'function' ) { callback = options ; params = { } ; } else { params = extend ( { } , options . params ) ; retry = options . retry ; } retry = ( retry === true ) && function ( ) { this . list . apply ( this , args ) ; } . bind ( this ) ; if ( params [ 'created_before' ] ) { params [ 'created_before' ] = getTimestamp ( params [ 'created_before' ] ) ; } if ( params [ 'created_after' ] ) { params [ 'created_after' ] = getTimestamp ( params [ 'created_after' ] ) ; } query = querystring . stringify ( params ) ; if ( query ) { query = '?' + query ; } handler = createResponseHandler ( callback , retry ) ; return req ( client . documentsURL + query , handler ) ; }
Fetch a list of documents uploaded using this API key
@param   {Object}   [options]                        List options
@param   {boolean}  [options.retry]                  Whether to retry the request after 'retry-after' seconds if the retry-after header is sent
@param   {Object}   [options.params]                 URL parameters
@param   {int}      [options.params.limit]           The number of documents to return (default: 10, max: 50)
@param   {Date}     [options.params.created_before]  An upper limit on the creation timestamps of documents returned (default: now)
@param   {Date}     [options.params.created_after]   A lower limit on the creation timestamps of documents returned
@param   {Function} [callback]                       A callback to call with the response data (or error)
@returns {Request}
Fetch a list of documents uploaded using this API key