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

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

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(urls:, options: nil, format_: :html) ⇒ Object

Scrape the listed pages as HTML.

Parameters:



577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'lib/context_dev/models/batch_submit_params.rb', line 577

class URL < ContextDev::Internal::Type::BaseModel
  # @!attribute url
  #   Page URL to scrape.
  #
  #   @return [String]
  required :url, String

  # @!attribute item_id
  #   Your ID for this page, returned with its result. The same URL can use different
  #   IDs.
  #
  #   @return [String, nil]
  optional :item_id, String, api_name: :itemId

  # @!attribute meta
  #   Custom JSON returned unchanged with this page result.
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :meta, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]

  # @!method initialize(url:, item_id: nil, meta: nil)
  #   Some parameter documentations has been truncated, see
  #   {ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::URL} for more
  #   details.
  #
  #   A page to scrape, with optional data for matching results.
  #
  #   @param url [String] Page URL to scrape.
  #
  #   @param item_id [String] Your ID for this page, returned with its result. The same URL can use different
  #
  #   @param meta [Hash{Symbol=>Object}] Custom JSON returned unchanged with this page result.
end

Instance Attribute Details

#item_idString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :item_id, String, api_name: :itemId

#metaHash{Symbol=>Object}?

Custom JSON returned unchanged with this page result.

Parameters:

  • (::Hash[Symbol, top])

Returns:

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


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

optional :meta, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]

#urlString

Page URL to scrape.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {