When a user enters a search, the format to call the AirBnB API should look like:
NOTE TO SELF:
needs to have an '&' symbol btw each key-value pair ( .map? )
needs to have an '=' symbol btw a key & its value ( .map? )
location:
can have as many whitespaces btw each value
any location string values will be concatenated with "US"
OR
it will be defaulted to "US" ( empty string )
var AirBnB_key = < AirBnB API key >; // will be hidden
var BASE_URL = 'https://api.airbnb.com/v2/search_results?client_id=${AirBnB_key}&locale=en-US¤cy=USD&_format=for_search_results&${params}';
var params = {
guests: 0, // int -- optional
location: '', // neighborhood, city or zipcode -- default: ''+'US'
min_bathrooms: 0, // int -- optional
min_bedrooms: 0, // int -- optional
min_beds: 0, // int -- optional
price_max: 0, // int -- optional (ceiling: 10k)
price_min: 0, // int -- default: 0 (cannot be negative)
}
When a user enters a search, the format to call the AirBnB API should look like: