Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

untitled notebook

node v8.17.0
version: 1.0.0
endpointsharetweet
const getInfoSkyscannerJSON = (data) => { const deeplinkText = `this is a link ${data.DeeplinkUrl}`; return { message: [ {text:deeplinkText} ] } }; const requestPromise = require('request-promise'); const requestOptions = { method: 'POST', uri: 'http://partners.api.skyscanner.net/apiservices/pricing/v1.0', body: { cabinclass: 'Economy', country: 'UK', originplace: 'CDG', destinationplace: 'LHR', outbounddate: '2017-12-12', inbounddate: '2017-12-20', adults: '1', apikey: 'apiKey' // Add more properties from the API }, json: true }; requestPromise(requestOptions) .then((data) => { const responseData = getInfoSkyscannerJSON(data) reponse.json(responseData); });
Loading…

no comments

    sign in to comment