Module: AngellistApi::Client::Search

Included in:
AngellistApi::Client
Defined in:
lib/angellist_api/client/search.rb

Overview

Defines methods related to URLs

Instance Method Summary collapse

Instance Method Details

#search(query, options = {}) ⇒ Object

Search for Startups, Users, MarketTags and LocationTags, optionally narrowing the results by type. Results are sorted by a mix of match and popularity.

Examples:

Search all data types.

AngellistApi.search('machine learning')

Search locations.

AngellistApi.search('springfield', :type => 'LocationTag')

Parameters:

  • query (String)

    The search query. Will be URI-escaped.

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

    A customizable set of options.

Options Hash (options):

  • :type (String)

    A scope for the query. Can be one of ‘User’, ‘Startup’, ‘MarketTag’ or ‘LocationTag’.



24
25
26
27
# File 'lib/angellist_api/client/search.rb', line 24

def search(query, options={})
  options.merge!(:query => CGI.escape(query))
  get("1/search", options)
end