class StreetEasy::Client

Constants

BASE_URI

Public Class Methods

api_key() click to toggle source
# File lib/street_easy/client.rb, line 5
def self.api_key
  @api_key
end
api_key=(key) click to toggle source
# File lib/street_easy/client.rb, line 9
def self.api_key=(key)
  @api_key = key
end
construct_url(query) click to toggle source
# File lib/street_easy/client.rb, line 13
def self.construct_url(query)
  uri = URI(
    "#{BASE_URI}" +
    "#{query[:property_type]}/" +
    "search?criteria=" +
      "area=#{query[:neighborhoods]}&" +
      "limit=#{query[:limit]}&" +
      "order=#{query[:order]}&" +
      "key=#{@api_key}&" +
      "format=json"
  )
end