module EventRegistryApi::Client::Concepts

The concepts api.

Public Instance Methods

concepts(keyword, options={}) click to toggle source

Get a list of concepts given a keyword prefix. @param {String} @param {Hash} @return {Array}

# File lib/event_registry_api/client/concepts.rb, line 22
def concepts (keyword, options={})
  options = {
    sources: SOURCES[0..2]
  }.merge(options)

  _get("/json/suggestConcepts", _concepts_query(keyword, options))
end

Private Instance Methods

_concepts_query(prefix, options) click to toggle source

@param {String} @param {Hash} @return {Hash}

# File lib/event_registry_api/client/concepts.rb, line 37
def _concepts_query (prefix, options)
  {
    "prefix" => prefix,
    "lang" => "eng",
    "fullLocInfo" => true,
    "source" => options[:sources]
  }
end