Module: AngellistApi::Client::Startups

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

Overview

Defines methods related to URLs

Instance Method Summary collapse

Instance Method Details

#all_startups(options = {}) ⇒ Object

Returns the firehose of companies on AngelList. Results are paginated.

Examples:

AngellistApi.all_startups(:filter => :raising)

Parameters:

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

    A customizable set of options.



54
55
56
# File 'lib/angellist_api/client/startups.rb', line 54

def all_startups(options={})
  get("1/startups", options)
end

#get_startup(id) ⇒ Object

Get a startup’s information given an ID.

Examples:

Get a startup’s information given an ID.

AngellistApi.get_startup(1234)

Parameters:

  • id (Integer)

    ID of the desired startup.



15
16
17
# File 'lib/angellist_api/client/startups.rb', line 15

def get_startup(id)
  get("1/startups/#{id}")
end

#get_startups(ids) ⇒ Object

Returns up to 50 startups at a time, given an Array of ids.

Examples:

Get information for a batch of startups.

AngellistApi.get_startups([1, 2, 3])

Parameters:

  • ids (Array)

    IDs of the startups to fetch.



40
41
42
43
# File 'lib/angellist_api/client/startups.rb', line 40

def get_startups(ids)
  params = { :ids => ids.join(',') }
  get("1/startups/batch", params)
end

#startup_comments(id) ⇒ Object

Returns the comments on the given startup.

Examples:

Get comments left about a startup with ID 1234.

AngellistApi.startup_comments(1234)

Parameters:

  • id (Integer)

    ID of the desired startup.



28
29
30
# File 'lib/angellist_api/client/startups.rb', line 28

def startup_comments(id)
  get("1/startups/#{id}/comments")
end

#startup_roles(id, options = {}) ⇒ Object

Returns a company’s startup roles. If direction is outgoing, then it returns the companies which the given company is tagged in. If direction is incoming, or omitted, then it returns the users and companies which are tagged in the given company. Results are paginated.

Examples:

Get

AngellistApi.startup_roles(1234)

Parameters:

  • id (Integer)

    ID of the desired startup.

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

    a customizable set of options

Options Hash (options):

  • :direction (String)

    Either incoming or outgoing. Defaults to incoming.

  • :page (Integer)

    Specifies the page of results to retrieve.



91
92
93
# File 'lib/angellist_api/client/startups.rb', line 91

def startup_roles(id, options={})
  get("1/startups/#{id}/roles", options)
end

#startup_search(options = {}) ⇒ Object

Search for a startup given a URL slug. Responds like GET /startups/:id.

Examples:

Search for a startup given a URL slug. Responds like GET /startups/:id.

AngellistApi.startup_search(:slug => '500-startups-fund')

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :slug (String)

    The URL slug of the desired startup.

  • :domain (String)

    The domain of the desired startup. Subdomains are not allowed. Keep in mind that startups can list any domain as their own. The startup with the most followers will be returned in the case of multiple hits.



71
72
73
# File 'lib/angellist_api/client/startups.rb', line 71

def startup_search(options={})
  get("1/startups/search", options)
end