Class: Airbnb::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/airbnb/base.rb

Direct Known Subclasses

V1, V2, V2::Listings, V2::Users

Constant Summary collapse

URL =
'https://api.airbnb.com'.freeze

Class Method Summary collapse

Class Method Details

.get(endpoint, params = {params: {}}) ⇒ Object



9
10
11
12
# File 'lib/airbnb/base.rb', line 9

def get(endpoint, params = {params: {}})
  params[:params][:client_id] = client_id
  HTTP.get(endpoint, params)
end

.post(endpoint, params) ⇒ Object



14
15
16
17
# File 'lib/airbnb/base.rb', line 14

def post(endpoint, params)
  params[:form][:client_id] = client_id
  HTTP.post(endpoint, params)
end