lib/tumblr.js
function addMethods(client, methods, requestType) {
    let apiPath, paramNames;
    for (const methodName in methods) {
        apiPath = methods[methodName];
        if (isString(apiPath)) {
            paramNames = [];
        } else if (isPlainObject(apiPath)) {
            paramNames = apiPath.paramNames || [];
            apiPath = apiPath.path;
        } else {
            paramNames = apiPath[1] || [];
            apiPath = apiPath[0];
        }
        addMethod(client, methodName, apiPath, paramNames, requestType || 'GET');
    }
}
function addMethods(client, methods, requestType) {
    let apiPath, paramNames;
    for (const methodName in methods) {
        apiPath = methods[methodName];
        if (isString(apiPath)) {
            paramNames = [];
        } else if (isPlainObject(apiPath)) {
            paramNames = apiPath.paramNames || [];
            apiPath = apiPath.path;
        } else {
            paramNames = apiPath[1] || [];
            apiPath = apiPath[0];
        }
        addMethod(client, methodName, apiPath, paramNames, requestType || 'GET');
    }
}
function addMethods ( client , methods , requestType ) { let apiPath , paramNames ; for ( const methodName in methods ) { apiPath = methods [ methodName ] ; if ( isString ( apiPath ) ) { paramNames = [ ] ; } else if ( isPlainObject ( apiPath ) ) { paramNames = apiPath . paramNames || [ ] ; apiPath = apiPath . path ; } else { paramNames = apiPath [ 1 ] || [ ] ; apiPath = apiPath [ 0 ] ; } addMethod ( client , methodName , apiPath , paramNames , requestType || 'GET' ) ; } }
Adds methods to the client

@param  {TumblrClient} client - an instance of the `tumblr.js` API client
@param  {Object} methods - mapping of method names to endpoints. Endpoints can be a string or an
array of format `[apiPathString, requireParamsArray]`
@param  {String|Function} requestType - the request type or a function that makes the request

@private
Adds methods to the client