Started rewrite

This commit is contained in:
hydrabolt
2015-10-31 15:25:59 +00:00
parent 3a04a15066
commit beab032811
31 changed files with 483 additions and 164 deletions

34
src/Client/Client.js Normal file
View File

@@ -0,0 +1,34 @@
"use strict";
var InternalClient = require("./InternalClient.js");
var EventEmitter = require("events");
class Client extends EventEmitter{
/*
this class is an interface for the internal
client.
*/
constructor(options){
super(options);
this.internal = new InternalClient(this);
}
login(email, password, cb=function(err, token){}){
var self = this;
return new Promise(function(resolve, reject){
self.internal.login(email, password)
.then((token)=>{
})
.catch((e)=>{
cb(e);
reject(e);
});
});
}
}
module.exports = Client;