class EasyBroker::Properties
Constants
- ENDPOINT
Attributes
api_client[R]
Public Class Methods
new(api_client)
click to toggle source
# File lib/easy_broker/properties.rb, line 8 def initialize(api_client) @api_client = api_client end
Public Instance Methods
find(public_id)
click to toggle source
# File lib/easy_broker/properties.rb, line 12 def find(public_id) response = api_client.get("#{ENDPOINT}/#{public_id}") JSON.parse(response.body, object_class: OpenStruct) end
search(query = {})
click to toggle source
# File lib/easy_broker/properties.rb, line 17 def search(query = {}) stored_query = EasyBroker::Query.new(api_client, ENDPOINT, query) EasyBroker::PaginatedResponse.new(stored_query) end