Skip to content

Commit

Permalink
Update instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mugan86 committed Jan 3, 2019
1 parent 84c442a commit 356d1e2
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ npm install proyecto-1b-api-github
```
const api = require('proyecto-1b-api-github');
api.obtenerDatosDeUsuario('mugan86')
.then(
respuesta => console.log(respuesta)
).
catch(error => console.log(error));
api.obtenerDatosDeUsuario('mugan86').then(
data => {
console.log(data);
if (data.message === undefined) { // OK message
console.log('OK');
console.log(data.login);
} else {
console.log(data.message); // ERROR message
}
}
);
```

0 comments on commit 356d1e2

Please sign in to comment.