Class: ContextDev::Models::WebScreenshotResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::WebScreenshotResponse
- Defined in:
- lib/context_dev/models/web_screenshot_response.rb,
sig/context_dev/models/web_screenshot_response.rbs
Overview
Defined Under Namespace
Modules: ScreenshotType Classes: CacheMetadata, KeyMetadata
Instance Attribute Summary collapse
-
#cache_metadata ⇒ ContextDev::Models::WebScreenshotResponse::CacheMetadata
Cache outcome for this response.
-
#code ⇒ Integer?
HTTP status code.
-
#domain ⇒ String?
The normalized domain that was processed.
-
#height ⇒ Integer?
Height in pixels of the returned screenshot image.
-
#key_metadata ⇒ ContextDev::Models::WebScreenshotResponse::KeyMetadata?
Metadata about the API key used for the request.
-
#screenshot ⇒ String?
Public image URL for standard requests, or an in-memory data URL when ZDR is enabled.
-
#screenshot_type ⇒ Symbol, ...
Type of screenshot that was captured.
-
#status ⇒ String?
Status of the response, e.g., 'ok'.
-
#width ⇒ Integer?
Width in pixels of the returned screenshot image.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(credits_consumed:, credits_remaining:) ⇒ Object
constructor
Metadata about the API key used for the request.
- #to_hash ⇒ {
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(credits_consumed:, credits_remaining:) ⇒ Object
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.
|
|
# File 'lib/context_dev/models/web_screenshot_response.rb', line 67
|
Instance Attribute Details
#cache_metadata ⇒ ContextDev::Models::WebScreenshotResponse::CacheMetadata
Cache outcome for this response. Composite responses are hits only when every cache-controlled fetch contributing to the output was a hit; age_ms is the oldest contributing hit.
13 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 13 required :cache_metadata, -> { ContextDev::Models::WebScreenshotResponse::CacheMetadata } |
#code ⇒ Integer?
HTTP status code
19 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 19 optional :code, Integer |
#domain ⇒ String?
The normalized domain that was processed
25 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 25 optional :domain, String |
#height ⇒ Integer?
Height in pixels of the returned screenshot image
31 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 31 optional :height, Integer |
#key_metadata ⇒ ContextDev::Models::WebScreenshotResponse::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.
38 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 38 optional :key_metadata, -> { ContextDev::Models::WebScreenshotResponse::KeyMetadata } |
#screenshot ⇒ String?
Public image URL for standard requests, or an in-memory data URL when ZDR is enabled.
45 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 45 optional :screenshot, String |
#screenshot_type ⇒ Symbol, ...
Type of screenshot that was captured
51 52 53 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 51 optional :screenshot_type, enum: -> { ContextDev::Models::WebScreenshotResponse::ScreenshotType }, api_name: :screenshotType |
#status ⇒ String?
Status of the response, e.g., 'ok'
59 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 59 optional :status, String |
#width ⇒ Integer?
Width in pixels of the returned screenshot image
65 |
# File 'lib/context_dev/models/web_screenshot_response.rb', line 65 optional :width, Integer |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/web_screenshot_response.rb', line 127
|
Instance Method Details
#to_hash ⇒ {
67 |
# File 'sig/context_dev/models/web_screenshot_response.rbs', line 67
def to_hash: -> {
|