bug fix and add promise feature
This commit is contained in:
@@ -1,16 +1,18 @@
|
|||||||
const GetFlix = require('../index');
|
const GetFlix = require('../index');
|
||||||
|
|
||||||
|
const getflix = new GetFlix('d9d6007d1bcf12043db5a085ae3e5bbb');
|
||||||
|
const getInfo = async () => {
|
||||||
try {
|
try {
|
||||||
const getflix = new GetFlix('f29e56ff85f361ff01b5c5403a343021');
|
const info = await getflix.getInfo('802329261');
|
||||||
getflix.getInfo('80040119', (res) => {
|
if(info == null) {
|
||||||
if (res.error) {
|
console.log('null');
|
||||||
console.log(res.errorMsg);
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
console.log(res);
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
console.log(error.message)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getInfo();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user