Class: ContextDev::Models::WebWebScrapeSitemapParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/context_dev/models/web_web_scrape_sitemap_params.rb,
sig/context_dev/models/web_web_scrape_sitemap_params.rbs

Overview

See Also:

  • ContextDev::Resources::Web#web_scrape_sitemap

Defined Under Namespace

Modules: Zdr

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::ContextDev

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(domain:, headers: nil, max_links: nil, search: nil, sitemap_url: nil, tags: nil, timeout_ms: nil, url_regex: nil, zdr: nil, request_options: {}) ⇒ Object

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

Parameters:

  • domain (String)

    Domain to build a sitemap for

  • headers (Hash{Symbol=>String}) (defaults to: nil)

    Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob

  • max_links (Integer) (defaults to: nil)

    Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Mi

  • search (String) (defaults to: nil)

    Optional search phrase. When provided, the crawled sitemap is filtered to the pa

  • sitemap_url (String) (defaults to: nil)

    Optional explicit sitemap URL. When provided, exactly this sitemap is crawled in

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

    Optional comma-separated caller-defined tags for tracking this request. Tags are

  • timeout_ms (Integer) (defaults to: nil)

    Optional timeout in milliseconds for the request. If the request takes longer th

  • url_regex (String) (defaults to: nil)

    Optional RE2-compatible regex pattern. Only URLs matching this pattern are retur

  • zdr (Symbol, ContextDev::Models::WebWebScrapeSitemapParams::Zdr) (defaults to: nil)

    Set to enabled to bypass shared caches and omit request and response content fro

  • request_options (ContextDev::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 78

Instance Attribute Details

#domainString

Domain to build a sitemap for

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 14

required :domain, String

#headersHash{Symbol=>String}?

Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers=value. When provided, caching is bypassed: the result is neither read from nor written to cache.

Parameters:

  • (::Hash[Symbol, String])

Returns:

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


22
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 22

optional :headers, ContextDev::Internal::Type::HashOf[String]

Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Minimum is 1, maximum is 100,000.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


29
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 29

optional :max_links, Integer

#searchString?

Optional search phrase. When provided, the crawled sitemap is filtered to the pages whose URLs are about that phrase, most relevant first, and the request costs 2 credits instead of 1.

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 37

optional :search, String

#sitemap_urlString?

Optional explicit sitemap URL. When provided, exactly this sitemap is crawled instead of discovering the domain's sitemaps.

Parameters:

  • (String)

Returns:

  • (String, nil)


44
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 44

optional :sitemap_url, String

#tagsArray<String>?

Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


52
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 52

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

#timeout_msInteger?

Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


60
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 60

optional :timeout_ms, Integer

#url_regexString?

Optional RE2-compatible regex pattern. Only URLs matching this pattern are returned and counted against maxLinks.

Parameters:

  • (String)

Returns:

  • (String, nil)


67
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 67

optional :url_regex, String

#zdrSymbol, ...

Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.



76
# File 'lib/context_dev/models/web_web_scrape_sitemap_params.rb', line 76

optional :zdr, enum: -> { ContextDev::WebWebScrapeSitemapParams::Zdr }

Instance Method Details

#to_hash{

Returns:

  • ({)


70
# File 'sig/context_dev/models/web_web_scrape_sitemap_params.rbs', line 70

def to_hash: -> {