title: How to upload a file to google drive programmatically
body: <p>can anybody suggest me how to upload a file from my app's local storage directory to google drive using javascript in titanium Appcelerator.</p>
  
  <p>i have tried the following code but it is not uploading the file.. thought some one can help me by seeing this code</p>
  
  <p>code : </p>
  
  <pre><code> var ggParams = {
  clientId: '662194379016.apps.googleusercontent.com',
  clientSecret: 'ffRSIWBlXyPwW-M1iQ6DNtXZ',
  redirectUri: 'http://localhost', //urn:ietf:wg:oauth:2.0:oob  
  devKey: 'AIzaSyBmXhfsc--2CdlSU8UD37Ryyd3qYaUxKls',
  };
  // Initialize Youtube Service
   var google = new Google(ggParams);
   google.login(function(e){
  Ti.API.info('Token: ' + google.accessToken());
  }); 
  /* google.refreshToken(function(e){
      Ti.API.info('New Token: ' + e.token);
  
  });*/  
  
   /*var params = {
      call: 'userinfo',
      method: 'GET',
      params: {
          client_id: '662194379016.apps.googleusercontent.com',
          client_secret: 'ffRSIWBlXyPwW-M1iQ6DNtXZ',
          redirect_uri: 'http://localhost', //urn:ietf:wg:oauth:2.0:oob  
          devKey: 'AIzaSyBmXhfsc--2CdlSU8UD37Ryyd3qYaUxKls',
          code:''
          }
  };*/
  google.callMethod( 
   args = {
      call: 'drive',  //token
      method: 'GET', //POST
      params: {
          clientId: '662194379016.apps.googleusercontent.com',
          clientSecret: 'ffRSIWBlXyPwW-M1iQ6DNtXZ',
          redirectUri: 'http://localhost', //urn:ietf:wg:oauth:2.0:oob  
          devKey: 'AIzaSyBmXhfsc--2CdlSU8UD37Ryyd3qYaUxKls',
           code: 200
          }
  },
  function(e){
  
      if (e.success){
          callback(e.data);
          Ti.API.info(e.data);
      }
      else{
          Ti.API.info(e.data);
          Ti.API.error('Error getting tokens');
  
      }
  }, false); //true or false or null
  </code></pre>