Module: Paperdrive::Client::SearchResults

Includes:
Parameters
Included in:
Paperdrive::Client
Defined in:
lib/paperdrive/client/search_results.rb

Overview

Instance methods related to SearchResults to embed into Paperdrive::Client
arguments are compatible with the Pipedribe API.

Instance Method Summary collapse

Instance Method Details

#search(**args) ⇒ Paperdrive::Response

GET

Perform a search



18
19
20
21
22
23
24
# File 'lib/paperdrive/client/search_results.rb', line 18

def search(**args)
  params = parameters(args) do
    required_params :term
    optional_params :term, :item_type, :start, :limit, :exact_match
  end
  request(:get, 'searchResults', params)
end

#specific_search(**args) ⇒ Paperdrive::Response

GET

Perform a search using a specific field value



30
31
32
33
34
35
36
# File 'lib/paperdrive/client/search_results.rb', line 30

def specific_search(**args)
  params = parameters(args) do
    required_params :term, :field_type, :field_key
    optional_params :term, :exact_match, :field_type, :field_key, :return_field_key, :return_item_ids, :start, :limit
  end
  request(:get, 'searchResults/field', params)
end