We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84c442a commit 356d1e2Copy full SHA for 356d1e2
README.md
@@ -15,9 +15,15 @@ npm install proyecto-1b-api-github
15
```
16
const api = require('proyecto-1b-api-github');
17
18
-api.obtenerDatosDeUsuario('mugan86')
19
- .then(
20
- respuesta => console.log(respuesta)
21
- ).
22
- catch(error => console.log(error));
+api.obtenerDatosDeUsuario('mugan86').then(
+ data => {
+ console.log(data);
+ if (data.message === undefined) { // OK message
+ console.log('OK');
23
+ console.log(data.login);
24
+ } else {
25
+ console.log(data.message); // ERROR message
26
+ }
27
28
+);
29
0 commit comments