lib/caseblocks_api/finder.rb in caseblocks_api-0.2.8 vs lib/caseblocks_api/finder.rb in caseblocks_api-0.2.9
- old
+ new
@@ -5,24 +5,24 @@
class Finder
def initialize(client)
@client = client
end
- def execute_single(case_type, property_name, value)
- @client.get("/case_blocks/#{case_type}", {query: {search: true, property: property_name, value: value}})
+ def execute_single(case_type, property_name, value, page, page_size)
+ @client.get("/case_blocks/#{case_type}", {query: {search: true, property: property_name, value: value, page: page, page_size: page_size}})
end
- def execute_multiple(case_type, properties)
- @client.post("/case_blocks/#{case_type}", :body => {search: true, properties: properties}.to_json)
+ def execute_multiple(case_type, properties, page, page_size)
+ @client.post("/case_blocks/#{case_type}", :body => {search: true, properties: properties, page: page, page_size: page_size }.to_json)
end
end
class Client
- def find_by_property(case_type, property_name, value)
- Finder.new(self.class).execute_single(case_type, property_name, value)
+ def find_by_property(case_type, property_name, value, page, page_size)
+ Finder.new(self.class).execute_single(case_type, property_name, value, page, page_size)
end
- def find_by_properties(case_type, properties)
- Finder.new(self.class).execute_multiple(case_type, properties)
+ def find_by_properties(case_type, properties, page, page_size)
+ Finder.new(self.class).execute_multiple(case_type, properties, page, page_size)
end
end
end