Class: ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::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_: :markdown) ⇒ Object

Scrape the listed pages as Markdown.

Parameters:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/context_dev/models/batch_submit_params.rb', line 124

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::Markdown::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)


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

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)


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

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

#urlString

Page URL to scrape.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {