functions/node_modules/googleapis/build/src/lib/discovery.js
/**
 * Given a schema, add methods to a target.
 *
 * @private
 * @param {object} target The target to which to apply the methods.
 * @param {object} rootSchema The top-level schema, so we don't lose track of it
 * during recursion.
 * @param {object} schema The current schema from which to extract methods.
 * @param {object} context The context to add to each method.
 */
Given a schema, add methods to a target.
@private
@param {object} target The target to which to apply the methods.
@param {object} rootSchema The top-level schema, so we don't lose track of it
during recursion.
@param {object} schema The current schema from which to extract methods.
@param {object} context The context to add to each method.
Given a schema add methods to a target . @private @param { object } target The target to which to apply the methods . @param { object } rootSchema The top - level schema so we don ' t lose track of it during recursion . @param { object } schema The current schema from which to extract methods . @param { object } context The context to add to each method .
function applyMethodsFromSchema(target, rootSchema, schema, context) {
    if (schema.methods) {
        for (var name in schema.methods) {
            if (schema.methods.hasOwnProperty(name)) {
                var method = schema.methods[name];
                target[name] = makeMethod(rootSchema, method, context);
            }
        }
    }
}
function applyMethodsFromSchema ( target , rootSchema , schema , context ) { if ( schema . methods ) { for ( var name in schema . methods ) { if ( schema . methods . hasOwnProperty ( name ) ) { var method = schema . methods [ name ] ; target [ name ] = makeMethod ( rootSchema , method , context ) ; } } } }
Given a schema, add methods to a target.
Given a schema add methods to a target .