Class: ContextDev::Models::BatchSubmitParams::Input::Scrape

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

Defined Under Namespace

Modules: Data

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(data:, mode: :scrape) ⇒ Object

Scrape up to 25K URLs in one batch.

Parameters:



# File 'lib/context_dev/models/batch_submit_params.rb', line 74

Instance Attribute Details

#dataContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML

Pages to scrape and their output format.

Parameters:

  • value (ContextDev::Models::BatchSubmitParams::Input::Scrape::data)

Returns:



66
# File 'lib/context_dev/models/batch_submit_params.rb', line 66

required :data, union: -> { ContextDev::BatchSubmitParams::Input::Scrape::Data }

#modeSymbol, :scrape

Scrape the pages in data.urls.

Parameters:

  • value (:scrape)

Returns:

  • (Symbol, :scrape)


72
# File 'lib/context_dev/models/batch_submit_params.rb', line 72

required :mode, const: :scrape

Instance Method Details

#to_hash{

Returns:

  • ({)


69
# File 'sig/context_dev/models/batch_submit_params.rbs', line 69

def to_hash: -> {