clubedevantagens
v1.2.0
Published
### Clube de Vantagens javascript client.
Downloads
6
Readme
clubedevantagens
Clube de Vantagens javascript client.
Installing
npm install clubedevantagens --save
Setting it up
To initiate the client you need to pass your authenticated user and password.
var clubedevantagens = require('clubedevantagens');
clubedevantagens.setUser('your-authenticated-user');
clubedevantagens.setPassword('user-password');
Using it
...
var clienteAutenticarPromise = clubedevantagens.clienteAutenticar('[email protected]')
clienteAutenticarPromise
.then(function (response) {
// do what you gotta do.
})
.catch(function (error) {
// error handling.
});
Methods
clienteCadastrar
Registers an user.
clubedevantagens.clienteCadastrar('User full name', 'User email', 'User CPF', 'User cellphone', 'User birth date', 'User gender', 'User state', 'User city', 'User password');
clienteAutenticar
Verifies if the user with the given email and password is registered.
clubedevantagens.clienteAutenticar('User email, User password');
clienteRecuperarSenha
Sends an recover password email to the given email address.
clubedevantagens.clienteRecuperarSenha('User email');
ofertaCodigo
Gets the details of an offer.
clubedevantagens.ofertaCodigo('offer code');
ofertaBuscar (limit, offset, uf, codigoCategoria, urlCategoria, termoDeBusca)
Lists offers based on a search term.
arguments
limit: Total of results per page offset: Page number uf: State abbreviation codigoCategoria: Category code urlCategoria: Category url termoDeBusca: Search term
clubedevantagens.ofertaBuscar('limit', 'offset', 'uf', 'codigoCategoria', 'urlCategoria', 'termoDeBusca');