Module: ClinicalTrials::Client::Api

Included in:
ClinicalTrials::Client
Defined in:
lib/clinical_trials/client/api.rb

Instance Method Summary collapse

Instance Method Details

#search(term, options = {}) ⇒ Hash

Returns search results for given term

Examples:

searc("lyme disease")

Parameters:

  • term (String)

    The term to search for

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



13
14
15
16
# File 'lib/clinical_trials/client/api.rb', line 13

def search(term, options={})
  term.sub(/\s/, "+")
  get("search?term=%22#{term}%22&displayxml=true", options)
end