Open maxto024 opened 7 years ago
Hey,
Thanks for trying this package out. The library was written in ES6 so you'll need to run it with babel-node
for it to recognise the import statements. (npm i -G babel-cli
then babel-node example.js
. Alternatively you could change the first line of the example file.
const Skyscanner = require('./lib/Skyscanner');
const service = new Skyscanner('YOUR_API_KEY');
// ...etc
and then change the arrow functions to vanilla javascript.
service.autosuggest('Napoli')
.then(function(suggestions) { // rather than .then(suggestions => {...}
return suggestions[0].PlaceId;
})
Looking around though, there are some better packages that you could use. I've not touched this in a long time.
Hi
I try to run your sdk code
first i did npm install
then Node example.js
i get this error