Class: ContextDev::Models::WebWebScrapeHTMLResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/web_web_scrape_html_response.rb

Overview

Defined Under Namespace

Modules: Success, Type

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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(html:, success:, type:, url:) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::WebWebScrapeHTMLResponse for more details.

Parameters:



# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 34

Instance Attribute Details

#htmlString

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.

Returns:

  • (String)


13
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 13

required :html, String

#successBoolean, ContextDev::Models::WebWebScrapeHTMLResponse::Success

Indicates success



19
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 19

required :success, enum: -> { ContextDev::Models::WebWebScrapeHTMLResponse::Success }

#typeSymbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type

Detected content type of the returned ‘html` field. Sitemaps and feeds are surfaced as `xml`; ordinary pages are `html`.



26
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 26

required :type, enum: -> { ContextDev::Models::WebWebScrapeHTMLResponse::Type }

#urlString

The URL that was scraped

Returns:

  • (String)


32
# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 32

required :url, String

Class Method Details

.valuesArray<Boolean>

Returns:

  • (Array<Boolean>)


# File 'lib/context_dev/models/web_web_scrape_html_response.rb', line 54