Class: Exa::Resources::Webset
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::Webset
- Defined in:
- lib/exa/resources/webset.rb
Overview
Represents a webset from the Exa API
A webset is a collection of web entities (companies, people, etc.) discovered through searches, imports, and enrichments.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#enrichments ⇒ Object
Returns the value of attribute enrichments.
-
#excludes ⇒ Object
Returns the value of attribute excludes.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#imports ⇒ Object
Returns the value of attribute imports.
-
#items ⇒ Object
Returns the value of attribute items.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#monitors ⇒ Object
Returns the value of attribute monitors.
-
#object ⇒ Object
Returns the value of attribute object.
-
#searches ⇒ Object
Returns the value of attribute searches.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #idle? ⇒ Boolean
-
#initialize(id:, object:, status:, external_id: nil, title: nil, searches: nil, imports: nil, enrichments: nil, monitors: nil, excludes: nil, metadata: nil, created_at: nil, updated_at: nil, items: nil) ⇒ Webset
constructor
A new instance of Webset.
- #processing? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize(id:, object:, status:, external_id: nil, title: nil, searches: nil, imports: nil, enrichments: nil, monitors: nil, excludes: nil, metadata: nil, created_at: nil, updated_at: nil, items: nil) ⇒ Webset
Returns a new instance of Webset.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/exa/resources/webset.rb', line 26 def initialize( id:, object:, status:, external_id: nil, title: nil, searches: nil, imports: nil, enrichments: nil, monitors: nil, excludes: nil, metadata: nil, created_at: nil, updated_at: nil, items: nil ) super freeze end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def created_at @created_at end |
#enrichments ⇒ Object
Returns the value of attribute enrichments
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def enrichments @enrichments end |
#excludes ⇒ Object
Returns the value of attribute excludes
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def excludes @excludes end |
#external_id ⇒ Object
Returns the value of attribute external_id
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def external_id @external_id end |
#id ⇒ Object
Returns the value of attribute id
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def id @id end |
#imports ⇒ Object
Returns the value of attribute imports
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def imports @imports end |
#items ⇒ Object
Returns the value of attribute items
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def items @items end |
#metadata ⇒ Object
Returns the value of attribute metadata
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def end |
#monitors ⇒ Object
Returns the value of attribute monitors
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def monitors @monitors end |
#object ⇒ Object
Returns the value of attribute object
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def object @object end |
#searches ⇒ Object
Returns the value of attribute searches
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def searches @searches end |
#status ⇒ Object
Returns the value of attribute status
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def status @status end |
#title ⇒ Object
Returns the value of attribute title
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
9 10 11 |
# File 'lib/exa/resources/webset.rb', line 9 def updated_at @updated_at end |
Instance Method Details
#idle? ⇒ Boolean
46 47 48 |
# File 'lib/exa/resources/webset.rb', line 46 def idle? status == "idle" end |
#processing? ⇒ Boolean
50 51 52 |
# File 'lib/exa/resources/webset.rb', line 50 def processing? status == "processing" end |
#to_h ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/exa/resources/webset.rb', line 54 def to_h { id: id, object: object, status: status, external_id: external_id, title: title, searches: searches, imports: imports, enrichments: enrichments, monitors: monitors, excludes: excludes, metadata: , created_at: created_at, updated_at: updated_at, items: items }.compact end |