lib/mls.rb in mls-0.5.5 vs lib/mls.rb in mls-0.5.6

- old
+ new

@@ -22,11 +22,11 @@ include Singleton API_VERSION = '0.1.0' attr_reader :url, :user_agent - attr_writer :asset_host, :image_host, :listing_amenities, :address_amenities + attr_writer :asset_host, :image_host, :agent_profile, :listing_amenities, :address_amenities attr_accessor :api_key, :auth_key, :logger # Sets the API Token and Host of the MLS Server # # #!ruby @@ -68,9 +68,14 @@ end def listing_amenities @listing_amenities ||= Yajl::Parser.new(:symbolize_keys => true) .parse(MLS.get('/listings/amenities').body) + end + + def agent_profile(id) + @agent_profile = Yajl::Parser.new(:symbolize_keys => true) + .parse(MLS.get("/agents/#{id}").body) end def address_amenities @address_amenities ||= Yajl::Parser.new(:symbolize_keys => true) .parse(MLS.get('/addresses/amenities').body)