Comparing version 0.0.5 to 0.0.6
@@ -93,4 +93,15 @@ var request = require('request'); | ||
type = S( S( S(res.Mensaje).stripTags().s.split(':')[1] ).trim().s ).capitalize().s; | ||
var message = S(res.Mensaje).stripTags().s; | ||
if( message.split(':').length > 1 ){ | ||
type = S( S( message.split(':')[1] ).trim().s ).capitalize().s; | ||
} | ||
else{ | ||
type = message; | ||
} | ||
} | ||
@@ -97,0 +108,0 @@ else{ |
{ | ||
"name": "tuc", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "TUC Client for Node.js", | ||
@@ -5,0 +5,0 @@ "author": "Paulo McNally <paulomcnally@gmail.com>", |
@@ -10,21 +10,21 @@ # TUC | ||
$ npm install tuc | ||
# Example | ||
var Tuc = require('tuc'); | ||
var tuc = new Tuc(); | ||
tuc.getBalance('00759795', function( balance ){ | ||
console.log( balance ); | ||
}); | ||
tuc.getType('00759795', function( type ){ | ||
console.log( type ); | ||
}); | ||
# Responses | ||
@@ -39,3 +39,4 @@ | ||
* [BruceLampson](https://github.com/BruceLampson) | ||
This is a unoficial client. For more info visit [https://mpeso.net/](https://mpeso.net/) | ||
* [robe007](https://github.com/robe007) | ||
This is a unoficial client. For more info visit [https://mpeso.net/](https://mpeso.net/) |
@@ -5,3 +5,3 @@ var Tuc = require('../lib/tuc'); | ||
tuc.getBalance('00759795', function( balance ){ | ||
tuc.getBalance('00000100', function( balance ){ | ||
@@ -13,3 +13,3 @@ console.log( balance ); | ||
tuc.getType('00759795', function( balance ){ | ||
tuc.getType('00000100', function( balance ){ | ||
@@ -16,0 +16,0 @@ console.log( balance ); |
14949
80
41