function sendDocument(attachments, document, cb) { log.info({ name: 'addition', identifier: document.identifier, }, "Uploading"); anyfetchClient.postDocument(document, rarity.carryAndSlice([attachments, document], 3, cb)); },
function getUserInfo(oauth2Client, tokens, cb) { oauth2Client.credentials = tokens; googleapis.oauth2('v2').userinfo.get({auth: oauth2Client}, rarity.carryAndSlice([tokens], 3, cb)); },
function getToken(cb) { var oauth2Client = new googleapis.auth.OAuth2(config.googleId, config.googleSecret, storedParams.callbackUrl); oauth2Client.getToken(reqParams.code, rarity.carryAndSlice([oauth2Client], 3, cb)); },
function getSentThreads(newCursor, hashedThreads, cb) { retrieveThreads('sentitems', queues, serviceData.documentsPerUpdate, serviceData.access_token, cursor, hashedThreads, rarity.carryAndSlice([newCursor, serviceData], 3, cb)); }
function refreshToken(cb) { var oauth2Client = new googleapis.auth.OAuth2(config.googleId, config.googleSecret, config.providerUrl + "/init/callback"); oauth2Client.refreshToken_(config.testRefreshToken, rarity.carryAndSlice([oauth2Client], 3, cb)); },