CSU-ITCapstone-Fall-23 / OnTheGo

Traveling App
0 stars 0 forks source link

Find a API and get approval #1

Open KianaSalt opened 1 year ago

fireman229 commented 1 year ago

This API helps to query rooms, price, facilities, policities, etc information from many hotels around the world to create a travelling site/application, such as : hotels.com

const axios = require('axios');

const options = { method: 'GET', url: 'https://hotels4.p.rapidapi.com/v2/get-meta-data', headers: { 'X-RapidAPI-Key': '51d88be3cfmshc0d5d8f34a52783p1527c2jsnfab1019e5285', 'X-RapidAPI-Host': 'hotels4.p.rapidapi.com' } };

try { const response = await axios.request(options); console.log(response.data); } catch (error) { console.error(error); }