Module: ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::AdditionalMeta

Extended by:
Internal::Type::Union
Defined in:
lib/context_dev/models/web_web_crawl_md_response.rb

Constant Summary collapse

StringArray =
ContextDev::Internal::Type::ArrayOf[String]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Class Method Details

.variantsArray(String, Array<String>)

Returns:

  • (Array(String, Array<String>))


# File 'lib/context_dev/models/web_web_crawl_md_response.rb', line 306

Instance Method Details

#initialize(crawl_depth:, final_url:, source_url:, status_code:, success:, title:, url:, additional_meta: nil, alternates: nil, author: nil, canonical_url: nil, description: nil, favicon: nil, image: nil, json_ld: nil, keywords: nil, language: nil, modified_time: nil, open_graph: nil, published_time: nil, robots: nil, site_name: nil, twitter: nil) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata for more details.

Parameters:

  • crawl_depth (Integer)

    Depth relative to the start URL. 0 = start URL, 1 = one link away.

  • final_url (String)

    Final URL scraped after redirects or scraper fallback, when known. Falls back to

  • source_url (String)

    Original URL requested by the caller.

  • status_code (Integer)

    HTTP status code of the response

  • success (Boolean)

    true if the page was fetched and parsed successfully

  • title (String)

    Best page title extracted from the page (empty string if unavailable).

  • url (String)

    The crawl URL fetched for this page.

  • additional_meta (Hash{Symbol=>String, Array<String>}) (defaults to: nil)

    Additional non-social meta tags not promoted to top-level metadata fields.

  • alternates (Array<ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::Alternate>) (defaults to: nil)

    Resolved alternate links from link rel=alternate tags.

  • author (String) (defaults to: nil)

    Author metadata, when present.

  • canonical_url (String) (defaults to: nil)

    Resolved canonical URL, when present.

  • description (String) (defaults to: nil)

    Best description extracted from standard, Open Graph, or Twitter metadata.

  • favicon (String) (defaults to: nil)

    Resolved favicon URL, when present.

  • image (String) (defaults to: nil)

    Primary resolved preview image from Open Graph, Twitter, or image metadata.

  • json_ld (Array<Hash{Symbol=>Object}>) (defaults to: nil)

    JSON-LD structured data blocks parsed from the page.

  • keywords (Array<String>) (defaults to: nil)

    Keywords extracted from the page’s keywords meta tag.

  • language (String) (defaults to: nil)

    Language extracted from html lang or language meta tags.

  • modified_time (String) (defaults to: nil)

    Modified timestamp/date from page metadata, when present.

  • open_graph (Hash{Symbol=>String, Array<String>}) (defaults to: nil)

    Open Graph metadata with the og: prefix removed and keys camel-cased.

  • published_time (String) (defaults to: nil)

    Published timestamp/date from page metadata, when present.

  • robots (String) (defaults to: nil)

    Robots meta directive, when present.

  • site_name (String) (defaults to: nil)

    Site or application name from page metadata.

  • twitter (Hash{Symbol=>String, Array<String>}) (defaults to: nil)

    Twitter card metadata with the twitter: prefix removed and keys camel-cased.



299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/context_dev/models/web_web_crawl_md_response.rb', line 299

module AdditionalMeta
  extend ContextDev::Internal::Type::Union

  variant String

  variant -> { ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::AdditionalMeta::StringArray }

  # @!method self.variants
  #   @return [Array(String, Array<String>)]

  # @type [ContextDev::Internal::Type::Converter]
  StringArray = ContextDev::Internal::Type::ArrayOf[String]
end