fix: update googleapis to latest

This commit is contained in:
Mrugesh Mohapatra
2019-08-13 21:42:58 +05:30
parent 6f3bd10c1f
commit 9061dab9b4
3 changed files with 649 additions and 522 deletions

View File

@ -2,7 +2,7 @@ import _ from 'lodash';
import debug from 'debug';
import dedent from 'dedent';
import fs from 'fs';
import goog from 'googleapis';
import { google } from 'googleapis';
import { Observable } from 'rx';
import { timeCache, observeMethod } from './rx';
@ -13,7 +13,7 @@ const scope = 'https://www.googleapis.com/auth/analytics.readonly';
const pathToCred = process.env.GOOGLE_APPLICATION_CREDENTIALS;
const log = debug('fcc:server:utils:about');
const analytics = goog.analytics('v3');
const analytics = google.analytics('v3');
const makeRequest = observeMethod(analytics.data.realtime, 'get');
export const toBoundInt = _.flow(
// first convert string to integer
@ -60,7 +60,7 @@ export function createActiveUsers() {
return zero;
}
const client = new goog.auth.JWT(
const client = new google.auth.JWT(
credentials['client_email'],
null,
credentials['private_key'],