Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update tests and README

Describe accountType
  • Loading branch information...
commit 476119a198721c796392089fc9f7b34658a641c4 1 parent 4797099
@Ajnasz authored
Showing with 13 additions and 5 deletions.
  1. +9 −1 README
  2. +1 −1  tests/test.js
  3. +3 −3 tests/testcaptcha.js
View
10 README
@@ -4,6 +4,9 @@ Requires at least nodejs 0.4.1
Properties:
errors: That is an object, filled with the possible error messages.
+ accountTypes: An object, where you can set the type of account to request authorization for.
+ properties are: google, hosted, hostedOrGoogle
+ default is hostedOrGoogle
Events:
login: emitted when login was success
@@ -100,7 +103,12 @@ Google Voice API (unoffical): |voice:
How to use:
var GoogleClientLogin = import('googleclientlogin').GoogleClientLogin;
-var googleAuth = new GoogleClientLogin({email: 'yourmail@gmail.com', password: 'yourpassword', service: 'contacts'});
+var googleAuth = new GoogleClientLogin({
+ email: 'yourmail@gmail.com',
+ password: 'yourpassword',
+ service: 'contacts',
+ accountType: GoogleClientLogin.accountTypes.google
+});
googleAuth.on(GoogleClientLogin.events.login, function(){
// do things with google services
require('https').request({
View
2  tests/test.js
@@ -32,7 +32,7 @@ var googleAuth = new GoogleClientLogin({
email: 'ajnasz@gmail.com',
password: 'foobar',
service: 'contacts',
- accountType: 'google'
+ accountType: GoogleClientLogin.accountTypes.google
});
googleAuth.on(GoogleClientLogin.events.login, function () {
console.log('login success');
View
6 tests/testcaptcha.js
@@ -10,7 +10,7 @@ var GoogleClientLogin = require('googleclientlogin').GoogleClientLogin;
email: 'ajnasz@gmail.com',
password: pw(),
service: 'contacts',
- accountType: 'google'
+ accountType: GoogleClientLogin.accountTypes.google
});
googleAuth.on(GoogleClientLogin.events.login, function () {
console.log('login success');
@@ -30,7 +30,7 @@ var GoogleClientLogin = require('googleclientlogin').GoogleClientLogin;
email: 'ajnasz@gmail.com',
password: pw(),
service: 'contacts',
- accountType: 'google'
+ accountType: GoogleClientLogin.accountTypes.google
});
googleAuth.on(GoogleClientLogin.events.login, function () {
console.log('login success');
@@ -51,7 +51,7 @@ var GoogleClientLogin = require('googleclientlogin').GoogleClientLogin;
email: 'ajnasz@gmail.com',
password: pw(),
service: 'contacts',
- accountType: 'google'
+ accountType: GoogleClientLogin.accountTypes.google
});
googleAuth.on(GoogleClientLogin.events.login, function () {
console.log('login success');
Please sign in to comment.
Something went wrong with that request. Please try again.