Class: Crunchbase::Searches::Client
- Inherits:
-
Object
- Object
- Crunchbase::Searches::Client
- Includes:
- Utilities::CbModel, Utilities::Request
- Defined in:
- lib/crunchbase/searches/client.rb
Overview
Send request for entities endpoints
API doc:
https://app.swaggerhub.com/apis-docs/Crunchbase/crunchbase-enterprise_api/1.0.1#/Search/post_searches_organizations
Notes
1. Only can filter `Searchable: Yes` fields
2. 'name', 'website' can not use
Constant Summary collapse
- ROOT_LIST =
'searches'
- LIMIT =
100
Instance Attribute Summary collapse
-
#conditions ⇒ Object
Returns the value of attribute conditions.
-
#count ⇒ Object
Returns the value of attribute count.
-
#entities ⇒ Object
Returns the value of attribute entities.
-
#entity_type ⇒ Object
Returns the value of attribute entity_type.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
Instance Method Summary collapse
-
#initialize(conditions, entity_type) ⇒ Client
constructor
A new instance of Client.
-
#searches ⇒ Object
Will include all attribute from API document.
Methods included from Utilities::CbModel
cbobject, exact_kclass_object, kclass_name
Methods included from Utilities::Request
Constructor Details
#initialize(conditions, entity_type) ⇒ Client
Returns a new instance of Client.
26 27 28 29 |
# File 'lib/crunchbase/searches/client.rb', line 26 def initialize(conditions, entity_type) @conditions = conditions @entity_type = entity_type end |
Instance Attribute Details
#conditions ⇒ Object
Returns the value of attribute conditions.
21 22 23 |
# File 'lib/crunchbase/searches/client.rb', line 21 def conditions @conditions end |
#count ⇒ Object
Returns the value of attribute count.
21 22 23 |
# File 'lib/crunchbase/searches/client.rb', line 21 def count @count end |
#entities ⇒ Object
Returns the value of attribute entities.
21 22 23 |
# File 'lib/crunchbase/searches/client.rb', line 21 def entities @entities end |
#entity_type ⇒ Object
Returns the value of attribute entity_type.
21 22 23 |
# File 'lib/crunchbase/searches/client.rb', line 21 def entity_type @entity_type end |
#total_count ⇒ Object
Returns the value of attribute total_count.
21 22 23 |
# File 'lib/crunchbase/searches/client.rb', line 21 def total_count @total_count end |
Instance Method Details
#searches ⇒ Object
Will include all attribute from API document
32 33 34 35 36 37 38 39 |
# File 'lib/crunchbase/searches/client.rb', line 32 def searches wrapping!( search( root_uri, data_raw.to_s.gsub('=>', ':') ) ) end |