Class: CaseblocksAPI::Searcher
- Inherits:
-
Object
- Object
- CaseblocksAPI::Searcher
- Defined in:
- lib/caseblocks_api/searcher.rb
Instance Method Summary collapse
- #execute_search(case_type, criteria, options = {}) ⇒ Object
-
#initialize(client) ⇒ Searcher
constructor
A new instance of Searcher.
Constructor Details
#initialize(client) ⇒ Searcher
Returns a new instance of Searcher.
6 7 8 |
# File 'lib/caseblocks_api/searcher.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#execute_search(case_type, criteria, options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/caseblocks_api/searcher.rb', line 10 def execute_search(case_type, criteria, ={}) body = {properties: criteria}.merge().to_json @client.post("/case_blocks/#{case_type}/search", :body => body) end |