Class: ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata

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

Overview

See Also:

Defined Under Namespace

Modules: AdditionalMeta, OpenGraph, Twitter Classes: Alternate

Instance Attribute 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(href:, hreflang: nil, title: nil, type: nil) ⇒ Object

Parameters:

  • href (String)

    Resolved alternate URL.

  • hreflang (String) (defaults to: nil)

    Language or locale for the alternate URL, when present.

  • title (String) (defaults to: nil)

    Alternate resource title, when present.

  • type (String) (defaults to: nil)

    Alternate resource MIME type, when present.



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

Instance Attribute Details

#additional_metaHash{Symbol=>String, Array<String>}?

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

Returns:

  • (Hash{Symbol=>String, Array<String>}, nil)


149
150
151
# File 'lib/context_dev/models/web_web_crawl_md_response.rb', line 149

optional :additional_meta,
-> { ContextDev::Internal::Type::HashOf[union: ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::AdditionalMeta] },
api_name: :additionalMeta

#alternatesArray<ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::Alternate>?

Resolved alternate links from link rel=alternate tags.



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

optional :alternates,
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::Alternate] }

#authorString?

Author metadata, when present.

Returns:

  • (String, nil)


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

optional :author, String

#canonical_urlString?

Resolved canonical URL, when present.

Returns:

  • (String, nil)


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

optional :canonical_url, String, api_name: :canonicalUrl

#crawl_depthInteger

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

Returns:

  • (Integer)


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

required :crawl_depth, Integer, api_name: :crawlDepth

#descriptionString?

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

Returns:

  • (String, nil)


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

optional :description, String

#faviconString?

Resolved favicon URL, when present.

Returns:

  • (String, nil)


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

optional :favicon, String

#final_urlString

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

Returns:

  • (String)


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

required :final_url, String, api_name: :finalUrl

#imageString?

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

Returns:

  • (String, nil)


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

optional :image, String

#json_ldArray<Hash{Symbol=>Object}>?

JSON-LD structured data blocks parsed from the page.

Returns:

  • (Array<Hash{Symbol=>Object}>, nil)


194
195
196
# File 'lib/context_dev/models/web_web_crawl_md_response.rb', line 194

optional :json_ld,
ContextDev::Internal::Type::ArrayOf[ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]],
api_name: :jsonLd

#keywordsArray<String>?

Keywords extracted from the page’s keywords meta tag.

Returns:

  • (Array<String>, nil)


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

optional :keywords, ContextDev::Internal::Type::ArrayOf[String]

#languageString?

Language extracted from html lang or language meta tags.

Returns:

  • (String, nil)


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

optional :language, String

#modified_timeString?

Modified timestamp/date from page metadata, when present.

Returns:

  • (String, nil)


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

optional :modified_time, String, api_name: :modifiedTime

#open_graphHash{Symbol=>String, Array<String>}?

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

Returns:

  • (Hash{Symbol=>String, Array<String>}, nil)


220
221
222
# File 'lib/context_dev/models/web_web_crawl_md_response.rb', line 220

optional :open_graph,
-> { ContextDev::Internal::Type::HashOf[union: ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::OpenGraph] },
api_name: :openGraph

#published_timeString?

Published timestamp/date from page metadata, when present.

Returns:

  • (String, nil)


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

optional :published_time, String, api_name: :publishedTime

#robotsString?

Robots meta directive, when present.

Returns:

  • (String, nil)


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

optional :robots, String

#site_nameString?

Site or application name from page metadata.

Returns:

  • (String, nil)


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

optional :site_name, String, api_name: :siteName

#source_urlString

Original URL requested by the caller.

Returns:

  • (String)


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

required :source_url, String, api_name: :sourceUrl

#status_codeInteger

HTTP status code of the response

Returns:

  • (Integer)


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

required :status_code, Integer, api_name: :statusCode

#successBoolean

true if the page was fetched and parsed successfully

Returns:

  • (Boolean)


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

required :success, ContextDev::Internal::Type::Boolean

#titleString

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

Returns:

  • (String)


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

required :title, String

#twitterHash{Symbol=>String, Array<String>}?

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

Returns:

  • (Hash{Symbol=>String, Array<String>}, nil)


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

optional :twitter,
-> { ContextDev::Internal::Type::HashOf[union: ContextDev::Models::WebWebCrawlMdResponse::Result::Metadata::Twitter] }

#urlString

The crawl URL fetched for this page.

Returns:

  • (String)


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

required :url, String