module Crunchbase::Utilities::EntityEndpoints
All Entity API endpoints
Public Instance Methods
acquisition(entity_id, **card_args)
click to toggle source
Lookup an Acquisition or Single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 50 def acquisition(entity_id, **card_args) lookup_for('acquisition', entity_id, card_args) end
acquisition_cards(entity_id, cards: [])
click to toggle source
Lookup Acquisition's all card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 55 def acquisition_cards(entity_id, cards: []) entities('acquisition', entity_id).fetch_cards(cards) end
fund(entity_id, **card_args)
click to toggle source
Lookup an fund or Single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 90 def fund(entity_id, **card_args) lookup_for('fund', entity_id, card_args) end
fund_cards(entity_id, cards: [])
click to toggle source
Lookup fund's all card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 95 def fund_cards(entity_id, cards: []) entities('fund', entity_id).fetch_cards(cards) end
funding_round(entity_id, **card_args)
click to toggle source
Lookup a Funding Round or single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 40 def funding_round(entity_id, **card_args) lookup_for('funding_round', entity_id, card_args) end
funding_round_cards(entity_id, cards: [])
click to toggle source
Lookup Funding Round's all cards
# File lib/crunchbase/utilities/entity_endpoints.rb, line 45 def funding_round_cards(entity_id, cards: []) entities('funding_round', entity_id).fetch_cards(cards) end
investment(entity_id, **card_args)
click to toggle source
Lookup an Investment or Single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 60 def investment(entity_id, **card_args) lookup_for('investment', entity_id, card_args) end
investment_cards(entity_id, cards: [])
click to toggle source
Lookup Investment's all card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 65 def investment_cards(entity_id, cards: []) entities('investment', entity_id).fetch_cards(cards) end
ipo(entity_id, **card_args)
click to toggle source
Lookup an Ipo or Single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 80 def ipo(entity_id, **card_args) lookup_for('ipo', entity_id, card_args) end
ipo_cards(entity_id, cards: [])
click to toggle source
Lookup Ipo's all card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 85 def ipo_cards(entity_id, cards: []) entities('ipo', entity_id).fetch_cards(cards) end
organization(entity_id, **card_args)
click to toggle source
Lookup an Organization or single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 20 def organization(entity_id, **card_args) lookup_for('organization', entity_id, card_args) end
organization_cards(entity_id, cards: [])
click to toggle source
Lookup Organization's all cards
# File lib/crunchbase/utilities/entity_endpoints.rb, line 25 def organization_cards(entity_id, cards: []) entities('organization', entity_id).fetch_cards(cards) end
ownership(entity_id, **card_args)
click to toggle source
Lookup an fund or Single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 100 def ownership(entity_id, **card_args) lookup_for('ownership', entity_id, card_args) end
ownership_cards(entity_id, cards: [])
click to toggle source
Lookup fund's all card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 105 def ownership_cards(entity_id, cards: []) entities('ownership', entity_id).fetch_cards(cards) end
person(entity_id, **card_args)
click to toggle source
Lookup a Person or single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 30 def person(entity_id, **card_args) lookup_for('person', entity_id, card_args) end
person_cards(entity_id, cards: [])
click to toggle source
Lookup Person's all cards
# File lib/crunchbase/utilities/entity_endpoints.rb, line 35 def person_cards(entity_id, cards: []) entities('person', entity_id).fetch_cards(cards) end
press_reference(entity_id, **card_args)
click to toggle source
Lookup an PressReference or Single card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 70 def press_reference(entity_id, **card_args) lookup_for('press_reference', entity_id, card_args) end
press_reference_cards(entity_id, cards: [])
click to toggle source
Lookup PressReference's all card
# File lib/crunchbase/utilities/entity_endpoints.rb, line 75 def press_reference_cards(entity_id, cards: []) entities('press_reference', entity_id).fetch_cards(cards) end
Private Instance Methods
entities(entity_type, entity_id)
click to toggle source
# File lib/crunchbase/utilities/entity_endpoints.rb, line 111 def entities(entity_type, entity_id) Crunchbase::Entities::Client.new(entity_id, entity_type) end
lookup_for(entity_type, entity_id, **card_args)
click to toggle source
# File lib/crunchbase/utilities/entity_endpoints.rb, line 115 def lookup_for(entity_type, entity_id, **card_args) kobject = entities(entity_type, entity_id) card_id = card_args&.delete(:card_id) return kobject.fetch if card_id.nil? kobject.cards(card_id, card_args) end