Class: ContextDev::Models::CrawlControls

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/crawl_controls.rb,
sig/context_dev/models/crawl_controls.rbs

Defined Under Namespace

Modules: Source

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(follow_subdomains:, max_depth:, max_pages:, source:, url_pattern:) ⇒ Object

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

The crawl controls as submitted, so the limits requested can be compared against what the crawl reached.

Parameters:

  • follow_subdomains (Boolean)

    Whether links to subdomains were followed. Always false for a sitemap crawl.

  • max_depth (Integer, nil)

    Link depth limit. Always 0 for a sitemap crawl, which never follows links off it

  • max_pages (Integer)

    The maxUrls submitted with the crawl. A sitemap crawl scrapes only the URLs it

  • source (ContextDev::Models::CrawlControls::Source::UnionMember0, ContextDev::Models::CrawlControls::Source::UnionMember1)

    Where the crawl started.

  • url_pattern (String, nil)

    RE2 pattern URLs had to match to be crawled. Null when the crawl set none.



# File 'lib/context_dev/models/crawl_controls.rb', line 38

Instance Attribute Details

#follow_subdomainsBoolean

Whether links to subdomains were followed. Always false for a sitemap crawl.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


10
# File 'lib/context_dev/models/crawl_controls.rb', line 10

required :follow_subdomains, ContextDev::Internal::Type::Boolean

#max_depthInteger?

Link depth limit. Always 0 for a sitemap crawl, which never follows links off its URLs; null when a start_url crawl set no limit.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


17
# File 'lib/context_dev/models/crawl_controls.rb', line 17

required :max_depth, Integer, nil?: true

#max_pagesInteger

The maxUrls submitted with the crawl. A sitemap crawl scrapes only the URLs its sitemap actually lists, up to this many, so input.reserved is often lower.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


24
# File 'lib/context_dev/models/crawl_controls.rb', line 24

required :max_pages, Integer

#sourceContextDev::Models::CrawlControls::Source::UnionMember0, ContextDev::Models::CrawlControls::Source::UnionMember1

Where the crawl started.

Parameters:

  • value (ContextDev::Models::CrawlControls::source)

Returns:



30
# File 'lib/context_dev/models/crawl_controls.rb', line 30

required :source, union: -> { ContextDev::CrawlControls::Source }

#url_patternString?

RE2 pattern URLs had to match to be crawled. Null when the crawl set none.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


36
# File 'lib/context_dev/models/crawl_controls.rb', line 36

required :url_pattern, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


31
# File 'sig/context_dev/models/crawl_controls.rbs', line 31

def to_hash: -> {