lib/generate.js
function newGet(endpoint, allowable) {
    return function(params, callback) {
        // allow options params
        var args = utils.allowOptionalParams(params, callback);
        // get and detach/remove the uri options
        var uriOptions = utils.getURIOptions([utils.setup(), this, args.params]);
        utils.removeURIOptions(args.params);
        // create the URI
        var uri = utils.url(endpoint, uriOptions);
        // get the auth options
        var authOptions = utils.getAuthOptions([utils.setup(), this, args.params]);
        utils.removeAuthOptions(args.params);
        // remove params that are not allowed
        args.params = utils.pickParams(args.params, allowable);
        // add the params as querystring to the URI
        utils.addQueries(uri, args.params);
        // sign the URI (automatically removes the secret param from the params)
        try {
            auth.sign(authOptions.key, authOptions.secret, uri);
        } catch(err) {
            return args.callback(err);
        }

        var url = uri.toString();
        debug("[GET] /%s (%s)", endpoint, url);
        return utils.request().get(url, utils.passResponse(args.callback));
    };
}
function newGet(endpoint, allowable) {
    return function(params, callback) {
        // allow options params
        var args = utils.allowOptionalParams(params, callback);
        // get and detach/remove the uri options
        var uriOptions = utils.getURIOptions([utils.setup(), this, args.params]);
        utils.removeURIOptions(args.params);
        // create the URI
        var uri = utils.url(endpoint, uriOptions);
        // get the auth options
        var authOptions = utils.getAuthOptions([utils.setup(), this, args.params]);
        utils.removeAuthOptions(args.params);
        // remove params that are not allowed
        args.params = utils.pickParams(args.params, allowable);
        // add the params as querystring to the URI
        utils.addQueries(uri, args.params);
        // sign the URI (automatically removes the secret param from the params)
        try {
            auth.sign(authOptions.key, authOptions.secret, uri);
        } catch(err) {
            return args.callback(err);
        }

        var url = uri.toString();
        debug("[GET] /%s (%s)", endpoint, url);
        return utils.request().get(url, utils.passResponse(args.callback));
    };
}
function newGet ( endpoint , allowable ) { return function ( params , callback ) { // allow options params var args = utils . allowOptionalParams ( params , callback ) ; // get and detach/remove the uri options var uriOptions = utils . getURIOptions ( [ utils . setup ( ) , this , args . params ] ) ; utils . removeURIOptions ( args . params ) ; // create the URI var uri = utils . url ( endpoint , uriOptions ) ; // get the auth options var authOptions = utils . getAuthOptions ( [ utils . setup ( ) , this , args . params ] ) ; utils . removeAuthOptions ( args . params ) ; // remove params that are not allowed args . params = utils . pickParams ( args . params , allowable ) ; // add the params as querystring to the URI utils . addQueries ( uri , args . params ) ; // sign the URI (automatically removes the secret param from the params) try { auth . sign ( authOptions . key , authOptions . secret , uri ) ; } catch ( err ) { return args . callback ( err ) ; } var url = uri . toString ( ) ; debug ( "[GET] /%s (%s)" , endpoint , url ) ; return utils . request ( ) . get ( url , utils . passResponse ( args . callback ) ) ; } ; }
Return a function for retrieving one or more items

@param  {Endpoint} endpoint
@param  {String[]} [allowable]
@return {itemsGetRequest}
Return a function for retrieving one or more items