penguyen1 / Padticular

1 stars 0 forks source link

Search -- format to get listings from AirBnB API #25

Closed penguyen1 closed 8 years ago

penguyen1 commented 8 years ago
When a user enters a search, the format to call the AirBnB API should look like:
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&currency=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)
}
penguyen1 commented 8 years ago

API call was a success! close #25