Created
May 26, 2022 14:30
-
-
Save Basitomania/27016bd2ea47df246d9ee8b3e5abacb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fetch Cities | |
``` | |
const URL = https://staging.plentywaka.com/api/v2/tes-park-web/locations | |
``` | |
example usage | |
``` | |
const getLocations = async (data, domain) => { | |
const customerHeaders = { | |
Accept: 'application/json', | |
'Content-Type': `application/json`, | |
'x-api-key': domain | |
} | |
const url = `${URL}`; | |
try { | |
const response = await axios.post(url, data, { headers: customerHeaders }); | |
if (response) { | |
console.log('response', response) | |
} | |
} catch (error) { | |
console.log('error', error) | |
} | |
} | |
``` | |
Fetch Itineries | |
To fecth Itineries, the search should redirect to this url with the following query params | |
``` | |
url = https://staging.tes.booking.treepz.com query params = departure, arrival, departureDate, seatCount, domain | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment