Class: ContextDev::Models::BatchGetResultsResponse

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

Overview

See Also:

  • ContextDev::Resources::Batch#get_results

Defined Under Namespace

Modules: Data Classes: KeyMetadata

Instance Attribute Summary collapse

Class Method 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(error_code:, message:, url:, item_id: nil, meta: nil, status: :error) ⇒ Object

A page the batch could not fetch.

Parameters:

  • error_code (String)

    Why the page failed.

  • message (String)

    Human-readable failure detail.

  • url (String)

    URL as submitted, or as discovered by the crawl.

  • item_id (String) (defaults to: nil)

    Caller-supplied identifier echoed from submission.

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

    Caller-supplied metadata echoed from submission.

  • status (Symbol, :error) (defaults to: :error)

    The page could not be scraped.



# File 'lib/context_dev/models/batch_get_results_response.rb', line 33

Instance Attribute Details

#dataArray<ContextDev::Models::BatchGetResultsResponse::Data::Ok, ContextDev::Models::BatchGetResultsResponse::Data::Error>?

Result records on this page.



11
12
# File 'lib/context_dev/models/batch_get_results_response.rb', line 11

optional :data,
-> { ContextDev::Internal::Type::ArrayOf[union: ContextDev::Models::BatchGetResultsResponse::Data] }

#has_moreBoolean?

Whether another page is available.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


18
# File 'lib/context_dev/models/batch_get_results_response.rb', line 18

optional :has_more, ContextDev::Internal::Type::Boolean

#key_metadataContextDev::Models::BatchGetResultsResponse::KeyMetadata?

Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.



25
# File 'lib/context_dev/models/batch_get_results_response.rb', line 25

optional :key_metadata, -> { ContextDev::Models::BatchGetResultsResponse::KeyMetadata }

#next_cursorString?

Cursor for the next page.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


31
# File 'lib/context_dev/models/batch_get_results_response.rb', line 31

optional :next_cursor, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


37
# File 'sig/context_dev/models/batch_get_results_response.rbs', line 37

def to_hash: -> {