lib/rentjuicer/listings.rb in rentjuicer-0.5.1 vs lib/rentjuicer/listings.rb in rentjuicer-0.6.0
- old
+ new
@@ -10,19 +10,19 @@
def search(params = {})
limit = params[:limit] || 20
params[:order_by] ||= "rent"
params[:order_direction] ||= "asc"
- SearchResponse.new(self.client.class.get(resource, :query => params), limit)
+ SearchResponse.new(self.client.process_get(resource, params), limit)
end
def featured(params = {})
params.merge!(:featured => 1)
search(params)
end
def find_by_id(listing_id)
- response = SearchResponse.new(self.client.class.get(resource, :query => {:rentjuice_id => listing_id}))
+ response = SearchResponse.new(self.client.process_get(resource, {:rentjuice_id => listing_id}))
(response.success? && response.properties.size > 0) ? response.properties.first : nil
end
def find_all(params = {})
per_page = params[:limit] || 20