Module: Catch::Search
- Included in:
- Client
- Defined in:
- lib/catch/search.rb
Instance Method Summary collapse
-
#search(query, params = {}) ⇒ Object
Search the user’s notes.
Instance Method Details
#search(query, params = {}) ⇒ Object
Search the user’s notes
Specifies a note sort order. Valid sort orders are: created_asc sort by note creation date in ascending order (most recent first) create_dec sort by note creation date in descending order (most recent last) modified_asc sort by note modification date in ascending order (most recent first) modified_dec sort by note modification date in descending order (most recent last) text_asc sort by the note text content from in ascending order (A to Z) text_dec sort by the note text content from in descending order (Z to A)
20 21 22 23 24 25 26 27 28 |
# File 'lib/catch/search.rb', line 20 def search(query, params={}) params[:q] = query connection.get do |req| req.url("search") # req.params = params req.params.merge!(params) end.body.notes end |