Class: ContextDev::Models::WebWebScrapeHTMLResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::WebWebScrapeHTMLResponse
- Defined in:
- lib/context_dev/models/web_web_scrape_html_response.rb,
sig/context_dev/models/web_web_scrape_html_response.rbs
Overview
Defined Under Namespace
Modules: Success, Type Classes: ActionsApplied, CacheMetadata, KeyMetadata, Metadata
Instance Attribute Summary collapse
-
#actions_applied ⇒ Array<ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied>?
One verified outcome per requested browser action, in request order.
-
#actions_html_stale ⇒ Boolean?
True when an action was applied but the returned content could not be refreshed afterward.
-
#cache_metadata ⇒ ContextDev::Models::WebWebScrapeHTMLResponse::CacheMetadata
Cache outcome for this response.
-
#html ⇒ String
The scraped content of the page.
-
#key_metadata ⇒ ContextDev::Models::WebWebScrapeHTMLResponse::KeyMetadata?
Metadata about the API key used for the request.
-
#metadata ⇒ ContextDev::Models::WebWebScrapeHTMLResponse::Metadata
Metadata extracted from the scraped page HTML.
-
#success ⇒ Boolean, ContextDev::Models::WebWebScrapeHTMLResponse::Success
Indicates success.
-
#type ⇒ Symbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type
Detected content type of the returned
htmlfield. -
#url ⇒ String
The URL that was scraped.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_metadata:, html:, metadata:, success:, type:, url:, actions_applied: nil, actions_html_stale: nil, key_metadata: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see WebWebScrapeHTMLResponse for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(cache_metadata:, html:, metadata:, success:, type:, url:, actions_applied: nil, actions_html_stale: nil, key_metadata: nil) ⇒ Object
Some parameter documentations has been truncated, see ContextDev::Models::WebWebScrapeHTMLResponse for more details.
|
|
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 72
|
Instance Attribute Details
#actions_applied ⇒ Array<ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied>?
One verified outcome per requested browser action, in request order.
54 55 56 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 54 optional :actions_applied, -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied] }, api_name: :actionsApplied |
#actions_html_stale ⇒ Boolean?
True when an action was applied but the returned content could not be refreshed afterward.
63 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 63 optional :actions_html_stale, ContextDev::Internal::Type::Boolean, api_name: :actionsHtmlStale |
#cache_metadata ⇒ ContextDev::Models::WebWebScrapeHTMLResponse::CacheMetadata
Cache outcome for this response. Composite responses are hits only when every cache-controlled fetch contributing to the output was a hit; age_ms is the oldest contributing hit.
13 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 13 required :cache_metadata, -> { ContextDev::Models::WebWebScrapeHTMLResponse::CacheMetadata } |
#html ⇒ String
The scraped content of the page. For normal pages this is the raw HTML. When the
page is a sitemap or feed served behind an XSL stylesheet (which browsers render
into HTML), this is the underlying XML instead — see the type field.
21 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 21 required :html, String |
#key_metadata ⇒ ContextDev::Models::WebWebScrapeHTMLResponse::KeyMetadata?
Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.
70 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 70 optional :key_metadata, -> { ContextDev::Models::WebWebScrapeHTMLResponse::KeyMetadata } |
#metadata ⇒ ContextDev::Models::WebWebScrapeHTMLResponse::Metadata
Metadata extracted from the scraped page HTML.
27 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 27 required :metadata, -> { ContextDev::Models::WebWebScrapeHTMLResponse::Metadata } |
#success ⇒ Boolean, ContextDev::Models::WebWebScrapeHTMLResponse::Success
Indicates success
33 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 33 required :success, enum: -> { ContextDev::Models::WebWebScrapeHTMLResponse::Success } |
#type ⇒ Symbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type
Detected content type of the returned html field. Sitemaps and feeds are
surfaced as xml; ordinary pages are html. Excel workbooks are surfaced as
xlsx/xls with the extracted sheets as HTML tables; PowerPoint presentations
are surfaced as pptx/ppt with the extracted slides as HTML.
42 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 42 required :type, enum: -> { ContextDev::Models::WebWebScrapeHTMLResponse::Type } |
#url ⇒ String
The URL that was scraped
48 |
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 48 required :url, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 132
|
Instance Method Details
#to_hash ⇒ {
57 |
# File 'sig/context_dev/models/web_web_scrape_html_response.rbs', line 57
def to_hash: -> {
|