src/api/v3/index.js
function getOperationContext(opType, options) {

    var operation = getOperation(opType);

    options = options || {};
    options.visibility = !options.token ? 'public' : 'private';
    options.apiRoot = APISPEC.root;

    operation.headers = operation.headers || {};
    operation.headers['GData-Version'] = Number(APISPEC.version).toFixed(1);

    if (options.token) {
        operation.headers['Authorization'] = 'Bearer ' + options.token;
        delete options.token;
    }

    operation.url = tpl(operation.url, options);

    operation.body = options.body;
    operation.strictSSL = false;

    return operation;
}
function getOperationContext(opType, options) {

    var operation = getOperation(opType);

    options = options || {};
    options.visibility = !options.token ? 'public' : 'private';
    options.apiRoot = APISPEC.root;

    operation.headers = operation.headers || {};
    operation.headers['GData-Version'] = Number(APISPEC.version).toFixed(1);

    if (options.token) {
        operation.headers['Authorization'] = 'Bearer ' + options.token;
        delete options.token;
    }

    operation.url = tpl(operation.url, options);

    operation.body = options.body;
    operation.strictSSL = false;

    return operation;
}
function getOperationContext ( opType , options ) { var operation = getOperation ( opType ) ; options = options || { } ; options . visibility = ! options . token ? 'public' : 'private' ; options . apiRoot = APISPEC . root ; operation . headers = operation . headers || { } ; operation . headers [ 'GData-Version' ] = Number ( APISPEC . version ) . toFixed ( 1 ) ; if ( options . token ) { operation . headers [ 'Authorization' ] = 'Bearer ' + options . token ; delete options . token ; } operation . url = tpl ( operation . url , options ) ; operation . body = options . body ; operation . strictSSL = false ; return operation ; }
Retrieves the operation context for the given type

@param opType
@param options
@returns {*}
Retrieves the operation context for the given type