Module: AngellistApi::Client::Tags

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

Overview

Defines methods related to URLs.

Instance Method Summary collapse

Instance Method Details

#get_tag(id) ⇒ Object

Get information on a tag.

Examples:

Get information on a tag.

AngellistApi.get_tag(1654)

Parameters:

  • id (Integer)

    ID of the desired tag.



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

def get_tag(id)
  get("1/tags/#{id}")
end

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

Returns children of the given tag. Market and location tags form a Directed Acyclic Graph. Results are paginated and ordered by id descending.

Examples:

Get children of a tag.

AngellistApi.get_tag_children(1654)

Parameters:

  • id (Integer)

    The id of the desired tag. Currently only works for tags of type MarketTag or LocationTag.

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

    A customizable set of options.



32
33
34
# File 'lib/angellist_api/client/tags.rb', line 32

def get_tag_children(id, options={})
  get("1/tags/#{id}/children", options)
end

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

Returns parents of the given tag. For more details, see the documentation for GET /tags/:id/children.

Examples:

Get parents of a tag.

AngellistApi.get_tag_parents(1654)

Parameters:

  • id (Integer)

    The id of the desired tag. Currently only works for tags of type MarketTag or LocationTag.

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

    A customizable set of options.



48
49
50
# File 'lib/angellist_api/client/tags.rb', line 48

def get_tag_parents(id, options={})
  get("1/tags/#{id}/parents", options)
end

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

Returns startups that are tagged with the given tag or a child of the given tag. Results are paginated and ordered according to the order parameter.

Examples:

Get startups tagged with tag ID or its children.

AngellistApi.get_tag_startups(1654)

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :order (String)

    May be one of popularity, asc or desc. Startups will be ordered by number of followers, ascending id or descending id, respectively. Defaults to desc

See Also:



68
69
70
# File 'lib/angellist_api/client/tags.rb', line 68

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