context.dev 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +2 -11
- data/lib/context_dev/models/ai_extract_product_response.rb +54 -1
- data/lib/context_dev/models/ai_extract_products_response.rb +54 -1
- data/lib/context_dev/models/batch_get_results_response.rb +56 -1
- data/lib/context_dev/models/batch_submit_response.rb +54 -1
- data/lib/context_dev/models/brand_retrieve_response.rb +58 -3
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +55 -1
- data/lib/context_dev/models/web_extract_fonts_response.rb +54 -1
- data/lib/context_dev/models/web_extract_response.rb +54 -1
- data/lib/context_dev/models/web_extract_styleguide_response.rb +55 -1
- data/lib/context_dev/models/web_screenshot_response.rb +54 -1
- data/lib/context_dev/models/web_search_response.rb +54 -1
- data/lib/context_dev/models/web_web_crawl_md_response.rb +54 -1
- data/lib/context_dev/models/web_web_scrape_html_response.rb +54 -1
- data/lib/context_dev/models/web_web_scrape_images_response.rb +55 -1
- data/lib/context_dev/models/web_web_scrape_md_response.rb +54 -1
- data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +10 -1
- data/lib/context_dev/resources/web.rb +10 -6
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/ai_extract_product_response.rbi +119 -0
- data/rbi/context_dev/models/ai_extract_products_response.rbi +119 -0
- data/rbi/context_dev/models/batch_get_results_response.rbi +121 -0
- data/rbi/context_dev/models/batch_submit_response.rbi +117 -0
- data/rbi/context_dev/models/brand_retrieve_response.rbi +123 -2
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +121 -0
- data/rbi/context_dev/models/web_extract_fonts_response.rbi +119 -0
- data/rbi/context_dev/models/web_extract_response.rbi +117 -0
- data/rbi/context_dev/models/web_extract_styleguide_response.rbi +119 -0
- data/rbi/context_dev/models/web_screenshot_response.rbi +117 -0
- data/rbi/context_dev/models/web_search_response.rbi +117 -0
- data/rbi/context_dev/models/web_web_crawl_md_response.rbi +117 -0
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +119 -0
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +119 -0
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +117 -0
- data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +13 -0
- data/rbi/context_dev/resources/web.rbi +10 -5
- data/sig/context_dev/models/ai_extract_product_response.rbs +39 -0
- data/sig/context_dev/models/ai_extract_products_response.rbs +39 -0
- data/sig/context_dev/models/batch_get_results_response.rbs +39 -0
- data/sig/context_dev/models/batch_submit_response.rbs +39 -0
- data/sig/context_dev/models/brand_retrieve_response.rbs +39 -0
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +39 -0
- data/sig/context_dev/models/web_extract_fonts_response.rbs +39 -0
- data/sig/context_dev/models/web_extract_response.rbs +39 -0
- data/sig/context_dev/models/web_extract_styleguide_response.rbs +39 -0
- data/sig/context_dev/models/web_screenshot_response.rbs +39 -0
- data/sig/context_dev/models/web_search_response.rbs +39 -0
- data/sig/context_dev/models/web_web_crawl_md_response.rbs +39 -0
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +39 -0
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +39 -0
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +39 -0
- data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +7 -0
- data/sig/context_dev/resources/web.rbs +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad23a0354a5f9cc6d6ad23a499a78ebe67f48f5e8d45c2660c70f9f6582acf39
|
|
4
|
+
data.tar.gz: 5b20bcd0881f27b3d5033c7664233cc5638d78358979bbe5b2fd25ae1f7538fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ebed39d39da3add4c5177e25f778c2f1483799859ab776b9db4bb8f3f452059a5b109cee3a4df284d5c1a09abe9c5b777323673c481d9af5e2aebeebbf3b90e
|
|
7
|
+
data.tar.gz: 4e8e97e0881e10ea884b242681ac561cbf737dfca8b85340e3fda3718ae836b926d9ec4d7eb6d4ed5defa288b83ab432472b7af6dec8f33d59501345c9982179
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.14.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.13.0...v2.14.0) (2026-09-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **sitemap:** add subdomain discovery ([5630b67](https://github.com/context-dot-dev/context-ruby-sdk/commit/5630b67ab555ab5dabd06b0ade2c4d2837f13423))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **openapi:** strip empty-object defaults from the generated spec ([fcbb393](https://github.com/context-dot-dev/context-ruby-sdk/commit/fcbb393067fd9058bb2d443bd2a8f2a9e4b8f17c))
|
|
14
|
+
|
|
15
|
+
## [2.13.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.12.0...v2.13.0) (2026-08-27)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* initial stlc build ([bf63ae0](https://github.com/context-dot-dev/context-ruby-sdk/commit/bf63ae0769d9756a0b36480fd0c2d05ae939997c))
|
|
21
|
+
|
|
3
22
|
## 2.12.0 (2026-08-23)
|
|
4
23
|
|
|
5
24
|
Full Changelog: [v2.11.0...v2.12.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.11.0...v2.12.0)
|
data/README.md
CHANGED
|
@@ -4,15 +4,6 @@ The Context Dev Ruby library provides convenient access to the Context Dev REST
|
|
|
4
4
|
|
|
5
5
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
6
6
|
|
|
7
|
-
## MCP Server
|
|
8
|
-
|
|
9
|
-
Use the Context Dev MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
10
|
-
|
|
11
|
-
[](https://cursor.com/en-US/install-mcp?name=context.dev-mcp&config=eyJuYW1lIjoiY29udGV4dC5kZXYtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vY29udGV4dC1kZXYuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1jb250ZXh0LWRldi1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)
|
|
12
|
-
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context.dev-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fcontext-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-context-dev-api-key%22%3A%22My%20API%20Key%22%7D%7D)
|
|
13
|
-
|
|
14
|
-
> Note: You may need to set environment variables in your MCP client.
|
|
15
|
-
|
|
16
7
|
## Documentation
|
|
17
8
|
|
|
18
9
|
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/context.dev).
|
|
@@ -26,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
26
17
|
<!-- x-release-please-start-version -->
|
|
27
18
|
|
|
28
19
|
```ruby
|
|
29
|
-
gem "context.dev", "~> 2.
|
|
20
|
+
gem "context.dev", "~> 2.14.0"
|
|
30
21
|
```
|
|
31
22
|
|
|
32
23
|
<!-- x-release-please-end -->
|
|
@@ -43,7 +34,7 @@ context_dev = ContextDev::Client.new(
|
|
|
43
34
|
|
|
44
35
|
brand = context_dev.brand.retrieve(body: {domain: "stripe.com", type: "by_domain"})
|
|
45
36
|
|
|
46
|
-
puts(brand.
|
|
37
|
+
puts(brand.cache_metadata)
|
|
47
38
|
```
|
|
48
39
|
|
|
49
40
|
### Handling errors
|
|
@@ -4,6 +4,14 @@ module ContextDev
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see ContextDev::Resources::AI#extract_product
|
|
6
6
|
class AIExtractProductResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_metadata
|
|
8
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
+
# oldest contributing hit.
|
|
11
|
+
#
|
|
12
|
+
# @return [ContextDev::Models::AIExtractProductResponse::CacheMetadata]
|
|
13
|
+
required :cache_metadata, -> { ContextDev::Models::AIExtractProductResponse::CacheMetadata }
|
|
14
|
+
|
|
7
15
|
# @!attribute is_product_page
|
|
8
16
|
# Whether the given URL is a product detail page
|
|
9
17
|
#
|
|
@@ -29,10 +37,12 @@ module ContextDev
|
|
|
29
37
|
# @return [ContextDev::Models::AIExtractProductResponse::Product, nil]
|
|
30
38
|
optional :product, -> { ContextDev::Models::AIExtractProductResponse::Product }, nil?: true
|
|
31
39
|
|
|
32
|
-
# @!method initialize(is_product_page: nil, key_metadata: nil, platform: nil, product: nil)
|
|
40
|
+
# @!method initialize(cache_metadata:, is_product_page: nil, key_metadata: nil, platform: nil, product: nil)
|
|
33
41
|
# Some parameter documentations has been truncated, see
|
|
34
42
|
# {ContextDev::Models::AIExtractProductResponse} for more details.
|
|
35
43
|
#
|
|
44
|
+
# @param cache_metadata [ContextDev::Models::AIExtractProductResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
45
|
+
#
|
|
36
46
|
# @param is_product_page [Boolean] Whether the given URL is a product detail page
|
|
37
47
|
#
|
|
38
48
|
# @param key_metadata [ContextDev::Models::AIExtractProductResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
@@ -41,6 +51,49 @@ module ContextDev
|
|
|
41
51
|
#
|
|
42
52
|
# @param product [ContextDev::Models::AIExtractProductResponse::Product, nil] The extracted product data, or null if not a product page
|
|
43
53
|
|
|
54
|
+
# @see ContextDev::Models::AIExtractProductResponse#cache_metadata
|
|
55
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
56
|
+
# @!attribute age_ms
|
|
57
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer]
|
|
60
|
+
required :age_ms, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute status
|
|
63
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
64
|
+
# zero-data-retention cache bypass.
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status]
|
|
67
|
+
required :status, enum: -> { ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status }
|
|
68
|
+
|
|
69
|
+
# @!method initialize(age_ms:, status:)
|
|
70
|
+
# Some parameter documentations has been truncated, see
|
|
71
|
+
# {ContextDev::Models::AIExtractProductResponse::CacheMetadata} for more details.
|
|
72
|
+
#
|
|
73
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
74
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
75
|
+
# oldest contributing hit.
|
|
76
|
+
#
|
|
77
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
78
|
+
#
|
|
79
|
+
# @param status [Symbol, ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
80
|
+
|
|
81
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
82
|
+
# zero-data-retention cache bypass.
|
|
83
|
+
#
|
|
84
|
+
# @see ContextDev::Models::AIExtractProductResponse::CacheMetadata#status
|
|
85
|
+
module Status
|
|
86
|
+
extend ContextDev::Internal::Type::Enum
|
|
87
|
+
|
|
88
|
+
HIT = :hit
|
|
89
|
+
MISS = :miss
|
|
90
|
+
ZDR = :zdr
|
|
91
|
+
|
|
92
|
+
# @!method self.values
|
|
93
|
+
# @return [Array<Symbol>]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
44
97
|
# @see ContextDev::Models::AIExtractProductResponse#key_metadata
|
|
45
98
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
46
99
|
# @!attribute credits_consumed
|
|
@@ -4,6 +4,14 @@ module ContextDev
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see ContextDev::Resources::AI#extract_products
|
|
6
6
|
class AIExtractProductsResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_metadata
|
|
8
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
+
# oldest contributing hit.
|
|
11
|
+
#
|
|
12
|
+
# @return [ContextDev::Models::AIExtractProductsResponse::CacheMetadata]
|
|
13
|
+
required :cache_metadata, -> { ContextDev::Models::AIExtractProductsResponse::CacheMetadata }
|
|
14
|
+
|
|
7
15
|
# @!attribute key_metadata
|
|
8
16
|
# Metadata about the API key used for the request. Included in every response
|
|
9
17
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
@@ -18,14 +26,59 @@ module ContextDev
|
|
|
18
26
|
optional :products,
|
|
19
27
|
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::AIExtractProductsResponse::Product] }
|
|
20
28
|
|
|
21
|
-
# @!method initialize(key_metadata: nil, products: nil)
|
|
29
|
+
# @!method initialize(cache_metadata:, key_metadata: nil, products: nil)
|
|
22
30
|
# Some parameter documentations has been truncated, see
|
|
23
31
|
# {ContextDev::Models::AIExtractProductsResponse} for more details.
|
|
24
32
|
#
|
|
33
|
+
# @param cache_metadata [ContextDev::Models::AIExtractProductsResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
34
|
+
#
|
|
25
35
|
# @param key_metadata [ContextDev::Models::AIExtractProductsResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
26
36
|
#
|
|
27
37
|
# @param products [Array<ContextDev::Models::AIExtractProductsResponse::Product>] Array of products extracted from the website
|
|
28
38
|
|
|
39
|
+
# @see ContextDev::Models::AIExtractProductsResponse#cache_metadata
|
|
40
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
41
|
+
# @!attribute age_ms
|
|
42
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
43
|
+
#
|
|
44
|
+
# @return [Integer]
|
|
45
|
+
required :age_ms, Integer
|
|
46
|
+
|
|
47
|
+
# @!attribute status
|
|
48
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
49
|
+
# zero-data-retention cache bypass.
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status]
|
|
52
|
+
required :status, enum: -> { ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status }
|
|
53
|
+
|
|
54
|
+
# @!method initialize(age_ms:, status:)
|
|
55
|
+
# Some parameter documentations has been truncated, see
|
|
56
|
+
# {ContextDev::Models::AIExtractProductsResponse::CacheMetadata} for more details.
|
|
57
|
+
#
|
|
58
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
59
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
60
|
+
# oldest contributing hit.
|
|
61
|
+
#
|
|
62
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
63
|
+
#
|
|
64
|
+
# @param status [Symbol, ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
65
|
+
|
|
66
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
67
|
+
# zero-data-retention cache bypass.
|
|
68
|
+
#
|
|
69
|
+
# @see ContextDev::Models::AIExtractProductsResponse::CacheMetadata#status
|
|
70
|
+
module Status
|
|
71
|
+
extend ContextDev::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
HIT = :hit
|
|
74
|
+
MISS = :miss
|
|
75
|
+
ZDR = :zdr
|
|
76
|
+
|
|
77
|
+
# @!method self.values
|
|
78
|
+
# @return [Array<Symbol>]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
29
82
|
# @see ContextDev::Models::AIExtractProductsResponse#key_metadata
|
|
30
83
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
31
84
|
# @!attribute credits_consumed
|
|
@@ -55,6 +55,14 @@ module ContextDev
|
|
|
55
55
|
variant :error, -> { ContextDev::Models::BatchGetResultsResponse::Data::Error }
|
|
56
56
|
|
|
57
57
|
class Ok < ContextDev::Internal::Type::BaseModel
|
|
58
|
+
# @!attribute cache_metadata
|
|
59
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
60
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
61
|
+
# oldest contributing hit.
|
|
62
|
+
#
|
|
63
|
+
# @return [ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata]
|
|
64
|
+
required :cache_metadata, -> { ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata }
|
|
65
|
+
|
|
58
66
|
# @!attribute final_url
|
|
59
67
|
# URL the content was read from, after redirects.
|
|
60
68
|
#
|
|
@@ -117,12 +125,14 @@ module ContextDev
|
|
|
117
125
|
# @return [Integer, nil]
|
|
118
126
|
optional :ocr_pages, Integer
|
|
119
127
|
|
|
120
|
-
# @!method initialize(final_url:, http_status:, metadata:, url:, html: nil, item_id: nil, markdown: nil, meta: nil, ocr_pages: nil, status: :ok)
|
|
128
|
+
# @!method initialize(cache_metadata:, final_url:, http_status:, metadata:, url:, html: nil, item_id: nil, markdown: nil, meta: nil, ocr_pages: nil, status: :ok)
|
|
121
129
|
# Some parameter documentations has been truncated, see
|
|
122
130
|
# {ContextDev::Models::BatchGetResultsResponse::Data::Ok} for more details.
|
|
123
131
|
#
|
|
124
132
|
# A page the batch fetched successfully.
|
|
125
133
|
#
|
|
134
|
+
# @param cache_metadata [ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
135
|
+
#
|
|
126
136
|
# @param final_url [String] URL the content was read from, after redirects.
|
|
127
137
|
#
|
|
128
138
|
# @param http_status [Integer, nil] HTTP status of the final response, when known.
|
|
@@ -143,6 +153,51 @@ module ContextDev
|
|
|
143
153
|
#
|
|
144
154
|
# @param status [Symbol, :ok] The page was scraped.
|
|
145
155
|
|
|
156
|
+
# @see ContextDev::Models::BatchGetResultsResponse::Data::Ok#cache_metadata
|
|
157
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
158
|
+
# @!attribute age_ms
|
|
159
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
160
|
+
#
|
|
161
|
+
# @return [Integer]
|
|
162
|
+
required :age_ms, Integer
|
|
163
|
+
|
|
164
|
+
# @!attribute status
|
|
165
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
166
|
+
# zero-data-retention cache bypass.
|
|
167
|
+
#
|
|
168
|
+
# @return [Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata::Status]
|
|
169
|
+
required :status,
|
|
170
|
+
enum: -> { ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata::Status }
|
|
171
|
+
|
|
172
|
+
# @!method initialize(age_ms:, status:)
|
|
173
|
+
# Some parameter documentations has been truncated, see
|
|
174
|
+
# {ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata} for more
|
|
175
|
+
# details.
|
|
176
|
+
#
|
|
177
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
178
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
179
|
+
# oldest contributing hit.
|
|
180
|
+
#
|
|
181
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
182
|
+
#
|
|
183
|
+
# @param status [Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
184
|
+
|
|
185
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
186
|
+
# zero-data-retention cache bypass.
|
|
187
|
+
#
|
|
188
|
+
# @see ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata#status
|
|
189
|
+
module Status
|
|
190
|
+
extend ContextDev::Internal::Type::Enum
|
|
191
|
+
|
|
192
|
+
HIT = :hit
|
|
193
|
+
MISS = :miss
|
|
194
|
+
ZDR = :zdr
|
|
195
|
+
|
|
196
|
+
# @!method self.values
|
|
197
|
+
# @return [Array<Symbol>]
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
146
201
|
# @see ContextDev::Models::BatchGetResultsResponse::Data::Ok#metadata
|
|
147
202
|
class Metadata < ContextDev::Internal::Type::BaseModel
|
|
148
203
|
# @!attribute final_url
|
|
@@ -10,6 +10,14 @@ module ContextDev
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :id, String
|
|
12
12
|
|
|
13
|
+
# @!attribute cache_metadata
|
|
14
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
15
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
16
|
+
# oldest contributing hit.
|
|
17
|
+
#
|
|
18
|
+
# @return [ContextDev::Models::BatchSubmitResponse::CacheMetadata]
|
|
19
|
+
required :cache_metadata, -> { ContextDev::Models::BatchSubmitResponse::CacheMetadata }
|
|
20
|
+
|
|
13
21
|
# @!attribute crawl
|
|
14
22
|
# The crawl controls as submitted, so the limits requested can be compared against
|
|
15
23
|
# what the crawl reached.
|
|
@@ -79,12 +87,14 @@ module ContextDev
|
|
|
79
87
|
# @return [String, nil]
|
|
80
88
|
optional :webhook_secret, String
|
|
81
89
|
|
|
82
|
-
# @!method initialize(id:, crawl:, created_at:, credits:, format_:, input:, invalid_urls:, mode:, status:, tags:, key_metadata: nil, webhook_secret: nil)
|
|
90
|
+
# @!method initialize(id:, cache_metadata:, crawl:, created_at:, credits:, format_:, input:, invalid_urls:, mode:, status:, tags:, key_metadata: nil, webhook_secret: nil)
|
|
83
91
|
# Some parameter documentations has been truncated, see
|
|
84
92
|
# {ContextDev::Models::BatchSubmitResponse} for more details.
|
|
85
93
|
#
|
|
86
94
|
# @param id [String] Batch ID. Poll GET /batch/{batch_id} with it.
|
|
87
95
|
#
|
|
96
|
+
# @param cache_metadata [ContextDev::Models::BatchSubmitResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
97
|
+
#
|
|
88
98
|
# @param crawl [ContextDev::Models::CrawlControls, nil] The crawl controls as submitted, so the limits requested can be compared against
|
|
89
99
|
#
|
|
90
100
|
# @param created_at [String] When the batch was created.
|
|
@@ -107,6 +117,49 @@ module ContextDev
|
|
|
107
117
|
#
|
|
108
118
|
# @param webhook_secret [String] Signing secret for the completion webhook, returned only here and never again. S
|
|
109
119
|
|
|
120
|
+
# @see ContextDev::Models::BatchSubmitResponse#cache_metadata
|
|
121
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
122
|
+
# @!attribute age_ms
|
|
123
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
124
|
+
#
|
|
125
|
+
# @return [Integer]
|
|
126
|
+
required :age_ms, Integer
|
|
127
|
+
|
|
128
|
+
# @!attribute status
|
|
129
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
130
|
+
# zero-data-retention cache bypass.
|
|
131
|
+
#
|
|
132
|
+
# @return [Symbol, ContextDev::Models::BatchSubmitResponse::CacheMetadata::Status]
|
|
133
|
+
required :status, enum: -> { ContextDev::Models::BatchSubmitResponse::CacheMetadata::Status }
|
|
134
|
+
|
|
135
|
+
# @!method initialize(age_ms:, status:)
|
|
136
|
+
# Some parameter documentations has been truncated, see
|
|
137
|
+
# {ContextDev::Models::BatchSubmitResponse::CacheMetadata} for more details.
|
|
138
|
+
#
|
|
139
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
140
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
141
|
+
# oldest contributing hit.
|
|
142
|
+
#
|
|
143
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
144
|
+
#
|
|
145
|
+
# @param status [Symbol, ContextDev::Models::BatchSubmitResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
146
|
+
|
|
147
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
148
|
+
# zero-data-retention cache bypass.
|
|
149
|
+
#
|
|
150
|
+
# @see ContextDev::Models::BatchSubmitResponse::CacheMetadata#status
|
|
151
|
+
module Status
|
|
152
|
+
extend ContextDev::Internal::Type::Enum
|
|
153
|
+
|
|
154
|
+
HIT = :hit
|
|
155
|
+
MISS = :miss
|
|
156
|
+
ZDR = :zdr
|
|
157
|
+
|
|
158
|
+
# @!method self.values
|
|
159
|
+
# @return [Array<Symbol>]
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
110
163
|
# @see ContextDev::Models::BatchSubmitResponse#credits
|
|
111
164
|
class Credits < ContextDev::Internal::Type::BaseModel
|
|
112
165
|
# @!attribute reserved
|
|
@@ -4,6 +4,14 @@ module ContextDev
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see ContextDev::Resources::Brand#retrieve
|
|
6
6
|
class BrandRetrieveResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_metadata
|
|
8
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
+
# oldest contributing hit.
|
|
11
|
+
#
|
|
12
|
+
# @return [ContextDev::Models::BrandRetrieveResponse::CacheMetadata]
|
|
13
|
+
required :cache_metadata, -> { ContextDev::Models::BrandRetrieveResponse::CacheMetadata }
|
|
14
|
+
|
|
7
15
|
# @!attribute brand
|
|
8
16
|
# Detailed brand information
|
|
9
17
|
#
|
|
@@ -29,10 +37,12 @@ module ContextDev
|
|
|
29
37
|
# @return [String, nil]
|
|
30
38
|
optional :status, String
|
|
31
39
|
|
|
32
|
-
# @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil)
|
|
40
|
+
# @!method initialize(cache_metadata:, brand: nil, code: nil, key_metadata: nil, status: nil)
|
|
33
41
|
# Some parameter documentations has been truncated, see
|
|
34
42
|
# {ContextDev::Models::BrandRetrieveResponse} for more details.
|
|
35
43
|
#
|
|
44
|
+
# @param cache_metadata [ContextDev::Models::BrandRetrieveResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
45
|
+
#
|
|
36
46
|
# @param brand [ContextDev::Models::BrandRetrieveResponse::Brand] Detailed brand information
|
|
37
47
|
#
|
|
38
48
|
# @param code [Integer] HTTP status code
|
|
@@ -41,6 +51,49 @@ module ContextDev
|
|
|
41
51
|
#
|
|
42
52
|
# @param status [String] Status of the response, e.g., 'ok'
|
|
43
53
|
|
|
54
|
+
# @see ContextDev::Models::BrandRetrieveResponse#cache_metadata
|
|
55
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
56
|
+
# @!attribute age_ms
|
|
57
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer]
|
|
60
|
+
required :age_ms, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute status
|
|
63
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
64
|
+
# zero-data-retention cache bypass.
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status]
|
|
67
|
+
required :status, enum: -> { ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status }
|
|
68
|
+
|
|
69
|
+
# @!method initialize(age_ms:, status:)
|
|
70
|
+
# Some parameter documentations has been truncated, see
|
|
71
|
+
# {ContextDev::Models::BrandRetrieveResponse::CacheMetadata} for more details.
|
|
72
|
+
#
|
|
73
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
74
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
75
|
+
# oldest contributing hit.
|
|
76
|
+
#
|
|
77
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
78
|
+
#
|
|
79
|
+
# @param status [Symbol, ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
80
|
+
|
|
81
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
82
|
+
# zero-data-retention cache bypass.
|
|
83
|
+
#
|
|
84
|
+
# @see ContextDev::Models::BrandRetrieveResponse::CacheMetadata#status
|
|
85
|
+
module Status
|
|
86
|
+
extend ContextDev::Internal::Type::Enum
|
|
87
|
+
|
|
88
|
+
HIT = :hit
|
|
89
|
+
MISS = :miss
|
|
90
|
+
ZDR = :zdr
|
|
91
|
+
|
|
92
|
+
# @!method self.values
|
|
93
|
+
# @return [Array<Symbol>]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
44
97
|
# @see ContextDev::Models::BrandRetrieveResponse#brand
|
|
45
98
|
class Brand < ContextDev::Internal::Type::BaseModel
|
|
46
99
|
# @!attribute address
|
|
@@ -106,7 +159,9 @@ module ContextDev
|
|
|
106
159
|
optional :links, -> { ContextDev::Models::BrandRetrieveResponse::Brand::Links }
|
|
107
160
|
|
|
108
161
|
# @!attribute logos
|
|
109
|
-
# An array of logos associated with the brand
|
|
162
|
+
# An array of logos associated with the brand. When a similarly shaped SVG variant
|
|
163
|
+
# exists, it is returned ahead of its raster equivalent; otherwise relevance order
|
|
164
|
+
# is preserved
|
|
110
165
|
#
|
|
111
166
|
# @return [Array<ContextDev::Models::BrandRetrieveResponse::Brand::Logo>, nil]
|
|
112
167
|
optional :logos,
|
|
@@ -178,7 +233,7 @@ module ContextDev
|
|
|
178
233
|
#
|
|
179
234
|
# @param links [ContextDev::Models::BrandRetrieveResponse::Brand::Links] Important website links for the brand
|
|
180
235
|
#
|
|
181
|
-
# @param logos [Array<ContextDev::Models::BrandRetrieveResponse::Brand::Logo>] An array of logos associated with the brand
|
|
236
|
+
# @param logos [Array<ContextDev::Models::BrandRetrieveResponse::Brand::Logo>] An array of logos associated with the brand. When a similarly shaped SVG variant
|
|
182
237
|
#
|
|
183
238
|
# @param phone [String] Company phone number
|
|
184
239
|
#
|
|
@@ -4,6 +4,14 @@ module ContextDev
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see ContextDev::Resources::Brand#retrieve_simplified
|
|
6
6
|
class BrandRetrieveSimplifiedResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_metadata
|
|
8
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
+
# oldest contributing hit.
|
|
11
|
+
#
|
|
12
|
+
# @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata]
|
|
13
|
+
required :cache_metadata, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata }
|
|
14
|
+
|
|
7
15
|
# @!attribute brand
|
|
8
16
|
# Simplified brand information
|
|
9
17
|
#
|
|
@@ -29,10 +37,12 @@ module ContextDev
|
|
|
29
37
|
# @return [String, nil]
|
|
30
38
|
optional :status, String
|
|
31
39
|
|
|
32
|
-
# @!method initialize(brand: nil, code: nil, key_metadata: nil, status: nil)
|
|
40
|
+
# @!method initialize(cache_metadata:, brand: nil, code: nil, key_metadata: nil, status: nil)
|
|
33
41
|
# Some parameter documentations has been truncated, see
|
|
34
42
|
# {ContextDev::Models::BrandRetrieveSimplifiedResponse} for more details.
|
|
35
43
|
#
|
|
44
|
+
# @param cache_metadata [ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
45
|
+
#
|
|
36
46
|
# @param brand [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand] Simplified brand information
|
|
37
47
|
#
|
|
38
48
|
# @param code [Integer] HTTP status code of the response
|
|
@@ -41,6 +51,50 @@ module ContextDev
|
|
|
41
51
|
#
|
|
42
52
|
# @param status [String] Status of the response, e.g., 'ok'
|
|
43
53
|
|
|
54
|
+
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse#cache_metadata
|
|
55
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
56
|
+
# @!attribute age_ms
|
|
57
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer]
|
|
60
|
+
required :age_ms, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute status
|
|
63
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
64
|
+
# zero-data-retention cache bypass.
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status]
|
|
67
|
+
required :status, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status }
|
|
68
|
+
|
|
69
|
+
# @!method initialize(age_ms:, status:)
|
|
70
|
+
# Some parameter documentations has been truncated, see
|
|
71
|
+
# {ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata} for more
|
|
72
|
+
# details.
|
|
73
|
+
#
|
|
74
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
75
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
76
|
+
# oldest contributing hit.
|
|
77
|
+
#
|
|
78
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
79
|
+
#
|
|
80
|
+
# @param status [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
81
|
+
|
|
82
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
83
|
+
# zero-data-retention cache bypass.
|
|
84
|
+
#
|
|
85
|
+
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata#status
|
|
86
|
+
module Status
|
|
87
|
+
extend ContextDev::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
HIT = :hit
|
|
90
|
+
MISS = :miss
|
|
91
|
+
ZDR = :zdr
|
|
92
|
+
|
|
93
|
+
# @!method self.values
|
|
94
|
+
# @return [Array<Symbol>]
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
44
98
|
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse#brand
|
|
45
99
|
class Brand < ContextDev::Internal::Type::BaseModel
|
|
46
100
|
# @!attribute backdrops
|
|
@@ -4,6 +4,14 @@ module ContextDev
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see ContextDev::Resources::Web#extract_fonts
|
|
6
6
|
class WebExtractFontsResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_metadata
|
|
8
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
+
# oldest contributing hit.
|
|
11
|
+
#
|
|
12
|
+
# @return [ContextDev::Models::WebExtractFontsResponse::CacheMetadata]
|
|
13
|
+
required :cache_metadata, -> { ContextDev::Models::WebExtractFontsResponse::CacheMetadata }
|
|
14
|
+
|
|
7
15
|
# @!attribute code
|
|
8
16
|
# HTTP status code, e.g., 200
|
|
9
17
|
#
|
|
@@ -46,10 +54,12 @@ module ContextDev
|
|
|
46
54
|
# @return [ContextDev::Models::WebExtractFontsResponse::KeyMetadata, nil]
|
|
47
55
|
optional :key_metadata, -> { ContextDev::Models::WebExtractFontsResponse::KeyMetadata }
|
|
48
56
|
|
|
49
|
-
# @!method initialize(code:, domain:, fonts:, status:, font_links: nil, key_metadata: nil)
|
|
57
|
+
# @!method initialize(cache_metadata:, code:, domain:, fonts:, status:, font_links: nil, key_metadata: nil)
|
|
50
58
|
# Some parameter documentations has been truncated, see
|
|
51
59
|
# {ContextDev::Models::WebExtractFontsResponse} for more details.
|
|
52
60
|
#
|
|
61
|
+
# @param cache_metadata [ContextDev::Models::WebExtractFontsResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
62
|
+
#
|
|
53
63
|
# @param code [Integer] HTTP status code, e.g., 200
|
|
54
64
|
#
|
|
55
65
|
# @param domain [String] The normalized domain that was processed
|
|
@@ -62,6 +72,49 @@ module ContextDev
|
|
|
62
72
|
#
|
|
63
73
|
# @param key_metadata [ContextDev::Models::WebExtractFontsResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
64
74
|
|
|
75
|
+
# @see ContextDev::Models::WebExtractFontsResponse#cache_metadata
|
|
76
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
77
|
+
# @!attribute age_ms
|
|
78
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
79
|
+
#
|
|
80
|
+
# @return [Integer]
|
|
81
|
+
required :age_ms, Integer
|
|
82
|
+
|
|
83
|
+
# @!attribute status
|
|
84
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
85
|
+
# zero-data-retention cache bypass.
|
|
86
|
+
#
|
|
87
|
+
# @return [Symbol, ContextDev::Models::WebExtractFontsResponse::CacheMetadata::Status]
|
|
88
|
+
required :status, enum: -> { ContextDev::Models::WebExtractFontsResponse::CacheMetadata::Status }
|
|
89
|
+
|
|
90
|
+
# @!method initialize(age_ms:, status:)
|
|
91
|
+
# Some parameter documentations has been truncated, see
|
|
92
|
+
# {ContextDev::Models::WebExtractFontsResponse::CacheMetadata} for more details.
|
|
93
|
+
#
|
|
94
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
95
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
96
|
+
# oldest contributing hit.
|
|
97
|
+
#
|
|
98
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
99
|
+
#
|
|
100
|
+
# @param status [Symbol, ContextDev::Models::WebExtractFontsResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
101
|
+
|
|
102
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
103
|
+
# zero-data-retention cache bypass.
|
|
104
|
+
#
|
|
105
|
+
# @see ContextDev::Models::WebExtractFontsResponse::CacheMetadata#status
|
|
106
|
+
module Status
|
|
107
|
+
extend ContextDev::Internal::Type::Enum
|
|
108
|
+
|
|
109
|
+
HIT = :hit
|
|
110
|
+
MISS = :miss
|
|
111
|
+
ZDR = :zdr
|
|
112
|
+
|
|
113
|
+
# @!method self.values
|
|
114
|
+
# @return [Array<Symbol>]
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
65
118
|
class Font < ContextDev::Internal::Type::BaseModel
|
|
66
119
|
# @!attribute fallbacks
|
|
67
120
|
# Array of fallback font families
|