title: Syntax error with Google API Node js client
body: <p>I'm trying to call the Google Analytics API within my express set-up. I'm encountering a syntaxe error at this level : <code>key.'mail'</code>. I've been building the following code from multiple example, and I can't find what could be wrong.</p>
  
  <p>Here is my code : </p>
  
  <pre><code>#!/usr/bin/env babel-node
  import google from 'googleapis';
  'use strict';
  
  import key from './client_id.json';
  const VIEW_ID = 'ga:80820965';
  
  let jwtClient = new google.auth.JWT(
      key.'mail', 
      null,
      key.'key',
      ['https://www.googleapis.com/auth/analytics.readonly'],null);
  
      jwtClient.authorize(function (err, tokens) {
        if (err) {
          console.log(err);
          return;
        }
        let analytics = google.analytics('v3');
        queryData(analytics);
      });
  
      function queryData(analytics) {
        analytics.data.ga.get({
          'auth': jwtClient,
          'ids': VIEW_ID,
          'metrics': 'ga:uniquePageviews',
          'dimensions': 'ga:pagePath',
          'start-date': '30daysAgo',
          'end-date': 'yesterday',
          'sort': '-ga:uniquePageviews',
          'max-results': 10,
        }, function (err, response) {
          if (err) {
            console.log(err);
            return;
          }
          console.log(JSON.stringify(response, null, 4));
        });  
      }
  
  module.exports = {queryData};
  </code></pre>
  
  <p>and here is my server.babel.js :</p>
  
  <pre><code>import express from 'express';
  
  const app = express();
  
  app.use('/', express.static('public'));
  app.use('/', express.static('src'));
  
  var authorRouter = require('./src/routes/authorRoutes');
  var ga = require('./src/routes/garoute');
  
  app.listen(process.env.PORT || 3000);
  
  //templating engine
  app.set('views', './src/views');      
  app.set('view engine', 'ejs');
  
  app.use('/test', ga.queryData());
  app.use('/authors', authorRouter.getAuthors());
  </code></pre>