Class: ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML

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

Classes: Options, URL

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(url:, item_id: nil, meta: nil) ⇒ Object

Some parameter documentations has been truncated, see URL for more details.

A page to scrape, with optional data for matching results.

Parameters:

  • url (String)

    Page URL to scrape.

  • item_id (String) (defaults to: nil)

    Your ID for this page, returned with its result. The same URL can use different

  • meta (Hash{Symbol=>Object}) (defaults to: nil)

    Custom JSON returned unchanged with this page result.



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

Instance Attribute Details

#format_Symbol, :html

Return page content as HTML.

Parameters:

  • value (:html)

Returns:

  • (Symbol, :html)


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

required :format_, const: :html, api_name: :format

#optionsContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options?

Options for HTML output.



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

optional :options, -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::Options }

#urlsArray<ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::URL>

Pages to scrape. Maximum 25000.

Parameters:

  • value (::Array[ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::URL])

Returns:



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

required :urls,
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::URL] }

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {