Module: Crunchbase::Utilities::Autocomplete

Included in:
Client
Defined in:
lib/crunchbase/utilities/autocomplete.rb

Overview

Autocomplete on Searches

Instance Method Summary collapse

Instance Method Details

#autocomplete(keyword, **args) ⇒ Object

endpoint: /autocompletes

Suggests matching Identifier entities based on the query and entity_def_ids provided.

query * string
   Value to perform the autocomplete search with.
collection_ids string
   A comma separated list of collection ids to search against.
   Leaving this blank means it will search across all identifiers.
   Entity defs can be constrained to specific facets by providing them as facet collections.
   Relationship collections will resolve to their underlying entity def.

   Collection ids are:
     organizations, people, funding_rounds, acquisitions, investments, events,
     press_references, funds, event_appearances, ipos, ownerships, categories,
     category_groups, locations, jobs
limit integer
   Number of results to retrieve; default = 10, max = 25

Example for organizations

raw_data = {
   query: keyword,
   collection_ids: 'organizations'
}


36
37
38
# File 'lib/crunchbase/utilities/autocomplete.rb', line 36

def autocomplete(keyword, **args)
  crunchbase_autocompletes(wrapper_autocompletes_data(keyword, args))
end