context.dev 2.5.0 → 2.7.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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +4 -0
  5. data/lib/context_dev/models/batch_cancel_params.rb +22 -0
  6. data/lib/context_dev/models/batch_cancel_response.rb +241 -0
  7. data/lib/context_dev/models/batch_get_results_params.rb +42 -0
  8. data/lib/context_dev/models/batch_get_results_response.rb +463 -0
  9. data/lib/context_dev/models/batch_list_params.rb +94 -0
  10. data/lib/context_dev/models/batch_list_response.rb +379 -0
  11. data/lib/context_dev/models/batch_retrieve_params.rb +22 -0
  12. data/lib/context_dev/models/batch_retrieve_response.rb +373 -0
  13. data/lib/context_dev/models/batch_submit_params.rb +56 -0
  14. data/lib/context_dev/models/batch_submit_response.rb +614 -0
  15. data/lib/context_dev/models/crawl_controls.rb +126 -0
  16. data/lib/context_dev/models/failure.rb +27 -0
  17. data/lib/context_dev/models/intake.rb +62 -0
  18. data/lib/context_dev/models/monitor_create_params.rb +141 -127
  19. data/lib/context_dev/models/monitor_create_response.rb +34 -10
  20. data/lib/context_dev/models/monitor_list_response.rb +21 -7
  21. data/lib/context_dev/models/monitor_retrieve_response.rb +21 -7
  22. data/lib/context_dev/models/monitor_update_params.rb +21 -7
  23. data/lib/context_dev/models/monitor_update_response.rb +21 -7
  24. data/lib/context_dev/models/page_error_count.rb +26 -0
  25. data/lib/context_dev/models/web_screenshot_params.rb +5 -7
  26. data/lib/context_dev/models/web_web_crawl_md_params.rb +5 -7
  27. data/lib/context_dev/models/web_web_scrape_html_params.rb +5 -7
  28. data/lib/context_dev/models/web_web_scrape_html_response.rb +93 -1
  29. data/lib/context_dev/models/web_web_scrape_md_params.rb +5 -7
  30. data/lib/context_dev/models/web_web_scrape_md_response.rb +93 -1
  31. data/lib/context_dev/models.rb +18 -0
  32. data/lib/context_dev/resources/batch.rb +152 -0
  33. data/lib/context_dev/resources/monitors.rb +5 -5
  34. data/lib/context_dev/resources/web.rb +4 -4
  35. data/lib/context_dev/version.rb +1 -1
  36. data/lib/context_dev.rb +15 -0
  37. data/rbi/context_dev/client.rbi +3 -0
  38. data/rbi/context_dev/models/batch_cancel_params.rbi +40 -0
  39. data/rbi/context_dev/models/batch_cancel_response.rbi +424 -0
  40. data/rbi/context_dev/models/batch_get_results_params.rbi +70 -0
  41. data/rbi/context_dev/models/batch_get_results_response.rbi +848 -0
  42. data/rbi/context_dev/models/batch_list_params.rbi +166 -0
  43. data/rbi/context_dev/models/batch_list_response.rbi +713 -0
  44. data/rbi/context_dev/models/batch_retrieve_params.rbi +40 -0
  45. data/rbi/context_dev/models/batch_retrieve_response.rbi +672 -0
  46. data/rbi/context_dev/models/batch_submit_params.rbi +105 -0
  47. data/rbi/context_dev/models/batch_submit_response.rbi +1330 -0
  48. data/rbi/context_dev/models/crawl_controls.rbi +252 -0
  49. data/rbi/context_dev/models/failure.rbi +35 -0
  50. data/rbi/context_dev/models/intake.rbi +88 -0
  51. data/rbi/context_dev/models/monitor_create_params.rbi +274 -242
  52. data/rbi/context_dev/models/monitor_create_response.rbi +38 -7
  53. data/rbi/context_dev/models/monitor_list_response.rbi +24 -5
  54. data/rbi/context_dev/models/monitor_retrieve_response.rbi +24 -5
  55. data/rbi/context_dev/models/monitor_update_params.rbi +24 -5
  56. data/rbi/context_dev/models/monitor_update_response.rbi +24 -5
  57. data/rbi/context_dev/models/page_error_count.rbi +34 -0
  58. data/rbi/context_dev/models/web_screenshot_params.rbi +6 -9
  59. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +6 -9
  60. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +6 -9
  61. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +182 -0
  62. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +6 -9
  63. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +180 -0
  64. data/rbi/context_dev/models.rbi +18 -0
  65. data/rbi/context_dev/resources/batch.rbi +117 -0
  66. data/rbi/context_dev/resources/monitors.rbi +12 -12
  67. data/rbi/context_dev/resources/web.rbi +8 -12
  68. data/sig/context_dev/client.rbs +2 -0
  69. data/sig/context_dev/models/batch_cancel_params.rbs +23 -0
  70. data/sig/context_dev/models/batch_cancel_response.rbs +174 -0
  71. data/sig/context_dev/models/batch_get_results_params.rbs +36 -0
  72. data/sig/context_dev/models/batch_get_results_response.rbs +399 -0
  73. data/sig/context_dev/models/batch_list_params.rbs +94 -0
  74. data/sig/context_dev/models/batch_list_response.rbs +283 -0
  75. data/sig/context_dev/models/batch_retrieve_params.rbs +23 -0
  76. data/sig/context_dev/models/batch_retrieve_response.rbs +262 -0
  77. data/sig/context_dev/models/batch_submit_params.rbs +52 -0
  78. data/sig/context_dev/models/batch_submit_response.rbs +542 -0
  79. data/sig/context_dev/models/crawl_controls.rbs +114 -0
  80. data/sig/context_dev/models/failure.rbs +15 -0
  81. data/sig/context_dev/models/intake.rbs +40 -0
  82. data/sig/context_dev/models/monitor_create_params.rbs +117 -97
  83. data/sig/context_dev/models/monitor_create_response.rbs +18 -1
  84. data/sig/context_dev/models/monitor_list_response.rbs +13 -1
  85. data/sig/context_dev/models/monitor_retrieve_response.rbs +13 -1
  86. data/sig/context_dev/models/monitor_update_params.rbs +13 -1
  87. data/sig/context_dev/models/monitor_update_response.rbs +13 -1
  88. data/sig/context_dev/models/page_error_count.rbs +15 -0
  89. data/sig/context_dev/models/web_web_scrape_html_response.rbs +85 -0
  90. data/sig/context_dev/models/web_web_scrape_md_response.rbs +85 -0
  91. data/sig/context_dev/models.rbs +18 -0
  92. data/sig/context_dev/resources/batch.rbs +41 -0
  93. data/sig/context_dev/resources/monitors.rbs +2 -2
  94. metadata +47 -2
@@ -216,9 +216,8 @@ module ContextDev
216
216
  # Optional parameter to choose the site's visual theme in the screenshot. Use
217
217
  # 'light' or 'dark' when the site offers both appearances.
218
218
  color_scheme: nil,
219
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
220
- # residential proxy exit location. Must be one of Context.dev's supported
221
- # countries. When provided, Context.dev fetches the target page from that country.
219
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
220
+ # alpha-2).
222
221
  country: nil,
223
222
  # A specific URL to screenshot directly, bypassing domain resolution (e.g.,
224
223
  # 'https://example.com/pricing'). When provided, the screenshot is taken of this
@@ -355,9 +354,8 @@ module ContextDev
355
354
  def web_crawl_md(
356
355
  # The starting URL for the crawl (must include http:// or https:// protocol)
357
356
  url:,
358
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
359
- # residential proxy exit location. Must be one of Context.dev's supported
360
- # countries. When provided, Context.dev fetches the target page from that country.
357
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
358
+ # alpha-2).
361
359
  country: nil,
362
360
  # CSS selectors to remove before each crawled page is converted to Markdown.
363
361
  # Applied after includeSelectors. Exclusion takes precedence: an element matching
@@ -473,9 +471,8 @@ module ContextDev
473
471
  # content is captured. Requires a paid plan. Send a JSON array in the query
474
472
  # parameter. Maximum: 5 actions.
475
473
  actions: nil,
476
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
477
- # residential proxy exit location. Must be one of Context.dev's supported
478
- # countries. When provided, Context.dev fetches the target page from that country.
474
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
475
+ # alpha-2).
479
476
  country: nil,
480
477
  # CSS selectors to remove from the result. Applied after includeSelectors.
481
478
  # Exclusion takes precedence: an element matching both is removed. Examples:
@@ -673,9 +670,8 @@ module ContextDev
673
670
  # content is captured. Requires a paid plan. Send a JSON array in the query
674
671
  # parameter. Maximum: 5 actions.
675
672
  actions: nil,
676
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
677
- # residential proxy exit location. Must be one of Context.dev's supported
678
- # countries. When provided, Context.dev fetches the target page from that country.
673
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
674
+ # alpha-2).
679
675
  country: nil,
680
676
  # CSS selectors to remove before conversion to Markdown. Applied after
681
677
  # includeSelectors. Exclusion takes precedence: an element matching both is
@@ -24,6 +24,8 @@ module ContextDev
24
24
 
25
25
  attr_reader monitors: ContextDev::Resources::Monitors
26
26
 
27
+ attr_reader batch: ContextDev::Resources::Batch
28
+
27
29
  private def auth_headers: -> ::Hash[String, String]
28
30
 
29
31
  def initialize: (
@@ -0,0 +1,23 @@
1
+ module ContextDev
2
+ module Models
3
+ type batch_cancel_params =
4
+ { batch_id: String } & ContextDev::Internal::Type::request_parameters
5
+
6
+ class BatchCancelParams < ContextDev::Internal::Type::BaseModel
7
+ extend ContextDev::Internal::Type::RequestParameters::Converter
8
+ include ContextDev::Internal::Type::RequestParameters
9
+
10
+ attr_accessor batch_id: String
11
+
12
+ def initialize: (
13
+ batch_id: String,
14
+ ?request_options: ContextDev::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ batch_id: String,
19
+ request_options: ContextDev::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,174 @@
1
+ module ContextDev
2
+ module Models
3
+ type batch_cancel_response =
4
+ {
5
+ id: String,
6
+ crawl: ContextDev::CrawlControls?,
7
+ credits: ContextDev::Models::BatchCancelResponse::Credits,
8
+ format_: ContextDev::Models::BatchCancelResponse::format_,
9
+ input: ContextDev::Intake,
10
+ mode: ContextDev::Models::BatchCancelResponse::mode,
11
+ page_errors: ::Array[ContextDev::PageErrorCount],
12
+ progress: ContextDev::Models::BatchCancelResponse::Progress,
13
+ status: ContextDev::Models::BatchCancelResponse::status,
14
+ tags: ::Array[String],
15
+ timing: ContextDev::Models::BatchCancelResponse::Timing,
16
+ key_metadata: ContextDev::Models::BatchCancelResponse::KeyMetadata
17
+ }
18
+
19
+ class BatchCancelResponse < ContextDev::Internal::Type::BaseModel
20
+ attr_accessor id: String
21
+
22
+ attr_accessor crawl: ContextDev::CrawlControls?
23
+
24
+ attr_accessor credits: ContextDev::Models::BatchCancelResponse::Credits
25
+
26
+ attr_accessor format_: ContextDev::Models::BatchCancelResponse::format_
27
+
28
+ attr_accessor input: ContextDev::Intake
29
+
30
+ attr_accessor mode: ContextDev::Models::BatchCancelResponse::mode
31
+
32
+ attr_accessor page_errors: ::Array[ContextDev::PageErrorCount]
33
+
34
+ attr_accessor progress: ContextDev::Models::BatchCancelResponse::Progress
35
+
36
+ attr_accessor status: ContextDev::Models::BatchCancelResponse::status
37
+
38
+ attr_accessor tags: ::Array[String]
39
+
40
+ attr_accessor timing: ContextDev::Models::BatchCancelResponse::Timing
41
+
42
+ attr_reader key_metadata: ContextDev::Models::BatchCancelResponse::KeyMetadata?
43
+
44
+ def key_metadata=: (
45
+ ContextDev::Models::BatchCancelResponse::KeyMetadata
46
+ ) -> ContextDev::Models::BatchCancelResponse::KeyMetadata
47
+
48
+ def initialize: (
49
+ id: String,
50
+ crawl: ContextDev::CrawlControls?,
51
+ credits: ContextDev::Models::BatchCancelResponse::Credits,
52
+ format_: ContextDev::Models::BatchCancelResponse::format_,
53
+ input: ContextDev::Intake,
54
+ mode: ContextDev::Models::BatchCancelResponse::mode,
55
+ page_errors: ::Array[ContextDev::PageErrorCount],
56
+ progress: ContextDev::Models::BatchCancelResponse::Progress,
57
+ status: ContextDev::Models::BatchCancelResponse::status,
58
+ tags: ::Array[String],
59
+ timing: ContextDev::Models::BatchCancelResponse::Timing,
60
+ ?key_metadata: ContextDev::Models::BatchCancelResponse::KeyMetadata
61
+ ) -> void
62
+
63
+ def to_hash: -> {
64
+ id: String,
65
+ crawl: ContextDev::CrawlControls?,
66
+ credits: ContextDev::Models::BatchCancelResponse::Credits,
67
+ format_: ContextDev::Models::BatchCancelResponse::format_,
68
+ input: ContextDev::Intake,
69
+ mode: ContextDev::Models::BatchCancelResponse::mode,
70
+ page_errors: ::Array[ContextDev::PageErrorCount],
71
+ progress: ContextDev::Models::BatchCancelResponse::Progress,
72
+ status: ContextDev::Models::BatchCancelResponse::status,
73
+ tags: ::Array[String],
74
+ timing: ContextDev::Models::BatchCancelResponse::Timing,
75
+ key_metadata: ContextDev::Models::BatchCancelResponse::KeyMetadata
76
+ }
77
+
78
+ type credits = { reserved: Integer }
79
+
80
+ class Credits < ContextDev::Internal::Type::BaseModel
81
+ attr_accessor reserved: Integer
82
+
83
+ def initialize: (reserved: Integer) -> void
84
+
85
+ def to_hash: -> { reserved: Integer }
86
+ end
87
+
88
+ type format_ = :markdown | :html
89
+
90
+ module Format
91
+ extend ContextDev::Internal::Type::Enum
92
+
93
+ MARKDOWN: :markdown
94
+ HTML: :html
95
+
96
+ def self?.values: -> ::Array[ContextDev::Models::BatchCancelResponse::format_]
97
+ end
98
+
99
+ type mode = :scrape | :crawl
100
+
101
+ module Mode
102
+ extend ContextDev::Internal::Type::Enum
103
+
104
+ SCRAPE: :scrape
105
+ CRAWL: :crawl
106
+
107
+ def self?.values: -> ::Array[ContextDev::Models::BatchCancelResponse::mode]
108
+ end
109
+
110
+ type progress = { failed: Integer, pending: Integer, succeeded: Integer }
111
+
112
+ class Progress < ContextDev::Internal::Type::BaseModel
113
+ attr_accessor failed: Integer
114
+
115
+ attr_accessor pending: Integer
116
+
117
+ attr_accessor succeeded: Integer
118
+
119
+ def initialize: (
120
+ failed: Integer,
121
+ pending: Integer,
122
+ succeeded: Integer
123
+ ) -> void
124
+
125
+ def to_hash: -> {
126
+ failed: Integer,
127
+ pending: Integer,
128
+ succeeded: Integer
129
+ }
130
+ end
131
+
132
+ type status = :cancelling
133
+
134
+ module Status
135
+ extend ContextDev::Internal::Type::Enum
136
+
137
+ CANCELLING: :cancelling
138
+
139
+ def self?.values: -> ::Array[ContextDev::Models::BatchCancelResponse::status]
140
+ end
141
+
142
+ type timing = { created_at: String, started_at: String? }
143
+
144
+ class Timing < ContextDev::Internal::Type::BaseModel
145
+ attr_accessor created_at: String
146
+
147
+ attr_accessor started_at: String?
148
+
149
+ def initialize: (created_at: String, started_at: String?) -> void
150
+
151
+ def to_hash: -> { created_at: String, started_at: String? }
152
+ end
153
+
154
+ type key_metadata =
155
+ { credits_consumed: Integer, credits_remaining: Integer }
156
+
157
+ class KeyMetadata < ContextDev::Internal::Type::BaseModel
158
+ attr_accessor credits_consumed: Integer
159
+
160
+ attr_accessor credits_remaining: Integer
161
+
162
+ def initialize: (
163
+ credits_consumed: Integer,
164
+ credits_remaining: Integer
165
+ ) -> void
166
+
167
+ def to_hash: -> {
168
+ credits_consumed: Integer,
169
+ credits_remaining: Integer
170
+ }
171
+ end
172
+ end
173
+ end
174
+ end
@@ -0,0 +1,36 @@
1
+ module ContextDev
2
+ module Models
3
+ type batch_get_results_params =
4
+ { batch_id: String, cursor: String, limit: Integer }
5
+ & ContextDev::Internal::Type::request_parameters
6
+
7
+ class BatchGetResultsParams < ContextDev::Internal::Type::BaseModel
8
+ extend ContextDev::Internal::Type::RequestParameters::Converter
9
+ include ContextDev::Internal::Type::RequestParameters
10
+
11
+ attr_accessor batch_id: String
12
+
13
+ attr_reader cursor: String?
14
+
15
+ def cursor=: (String) -> String
16
+
17
+ attr_reader limit: Integer?
18
+
19
+ def limit=: (Integer) -> Integer
20
+
21
+ def initialize: (
22
+ batch_id: String,
23
+ ?cursor: String,
24
+ ?limit: Integer,
25
+ ?request_options: ContextDev::request_opts
26
+ ) -> void
27
+
28
+ def to_hash: -> {
29
+ batch_id: String,
30
+ cursor: String,
31
+ limit: Integer,
32
+ request_options: ContextDev::RequestOptions
33
+ }
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,399 @@
1
+ module ContextDev
2
+ module Models
3
+ type batch_get_results_response =
4
+ {
5
+ data: ::Array[ContextDev::Models::BatchGetResultsResponse::data],
6
+ has_more: bool,
7
+ key_metadata: ContextDev::Models::BatchGetResultsResponse::KeyMetadata,
8
+ next_cursor: String?
9
+ }
10
+
11
+ class BatchGetResultsResponse < ContextDev::Internal::Type::BaseModel
12
+ attr_reader data: ::Array[ContextDev::Models::BatchGetResultsResponse::data]?
13
+
14
+ def data=: (
15
+ ::Array[ContextDev::Models::BatchGetResultsResponse::data]
16
+ ) -> ::Array[ContextDev::Models::BatchGetResultsResponse::data]
17
+
18
+ attr_reader has_more: bool?
19
+
20
+ def has_more=: (bool) -> bool
21
+
22
+ attr_reader key_metadata: ContextDev::Models::BatchGetResultsResponse::KeyMetadata?
23
+
24
+ def key_metadata=: (
25
+ ContextDev::Models::BatchGetResultsResponse::KeyMetadata
26
+ ) -> ContextDev::Models::BatchGetResultsResponse::KeyMetadata
27
+
28
+ attr_accessor next_cursor: String?
29
+
30
+ def initialize: (
31
+ ?data: ::Array[ContextDev::Models::BatchGetResultsResponse::data],
32
+ ?has_more: bool,
33
+ ?key_metadata: ContextDev::Models::BatchGetResultsResponse::KeyMetadata,
34
+ ?next_cursor: String?
35
+ ) -> void
36
+
37
+ def to_hash: -> {
38
+ data: ::Array[ContextDev::Models::BatchGetResultsResponse::data],
39
+ has_more: bool,
40
+ key_metadata: ContextDev::Models::BatchGetResultsResponse::KeyMetadata,
41
+ next_cursor: String?
42
+ }
43
+
44
+ type data =
45
+ ContextDev::Models::BatchGetResultsResponse::Data::Ok
46
+ | ContextDev::Models::BatchGetResultsResponse::Data::Error
47
+
48
+ module Data
49
+ extend ContextDev::Internal::Type::Union
50
+
51
+ type ok =
52
+ {
53
+ final_url: String,
54
+ http_status: Integer?,
55
+ metadata: ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata,
56
+ status: :ok,
57
+ url: String,
58
+ html: String,
59
+ item_id: String,
60
+ markdown: String,
61
+ meta: ::Hash[Symbol, top]
62
+ }
63
+
64
+ class Ok < ContextDev::Internal::Type::BaseModel
65
+ attr_accessor final_url: String
66
+
67
+ attr_accessor http_status: Integer?
68
+
69
+ attr_accessor metadata: ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata
70
+
71
+ attr_accessor status: :ok
72
+
73
+ attr_accessor url: String
74
+
75
+ attr_reader html: String?
76
+
77
+ def html=: (String) -> String
78
+
79
+ attr_reader item_id: String?
80
+
81
+ def item_id=: (String) -> String
82
+
83
+ attr_reader markdown: String?
84
+
85
+ def markdown=: (String) -> String
86
+
87
+ attr_reader meta: ::Hash[Symbol, top]?
88
+
89
+ def meta=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
90
+
91
+ def initialize: (
92
+ final_url: String,
93
+ http_status: Integer?,
94
+ metadata: ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata,
95
+ url: String,
96
+ ?html: String,
97
+ ?item_id: String,
98
+ ?markdown: String,
99
+ ?meta: ::Hash[Symbol, top],
100
+ ?status: :ok
101
+ ) -> void
102
+
103
+ def to_hash: -> {
104
+ final_url: String,
105
+ http_status: Integer?,
106
+ metadata: ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata,
107
+ status: :ok,
108
+ url: String,
109
+ html: String,
110
+ item_id: String,
111
+ markdown: String,
112
+ meta: ::Hash[Symbol, top]
113
+ }
114
+
115
+ type metadata =
116
+ {
117
+ final_url: String,
118
+ source_url: String,
119
+ additional_meta: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::additional_meta],
120
+ alternates: ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::Alternate],
121
+ author: String,
122
+ canonical_url: String,
123
+ description: String,
124
+ favicon: String,
125
+ image: String,
126
+ json_ld: ::Array[::Hash[Symbol, top]],
127
+ keywords: ::Array[String],
128
+ language: String,
129
+ modified_time: String,
130
+ open_graph: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::open_graph],
131
+ published_time: String,
132
+ robots: String,
133
+ site_name: String,
134
+ title: String,
135
+ twitter: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::twitter]
136
+ }
137
+
138
+ class Metadata < ContextDev::Internal::Type::BaseModel
139
+ attr_accessor final_url: String
140
+
141
+ attr_accessor source_url: String
142
+
143
+ attr_reader additional_meta: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::additional_meta]?
144
+
145
+ def additional_meta=: (
146
+ ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::additional_meta]
147
+ ) -> ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::additional_meta]
148
+
149
+ attr_reader alternates: ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::Alternate]?
150
+
151
+ def alternates=: (
152
+ ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::Alternate]
153
+ ) -> ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::Alternate]
154
+
155
+ attr_reader author: String?
156
+
157
+ def author=: (String) -> String
158
+
159
+ attr_reader canonical_url: String?
160
+
161
+ def canonical_url=: (String) -> String
162
+
163
+ attr_reader description: String?
164
+
165
+ def description=: (String) -> String
166
+
167
+ attr_reader favicon: String?
168
+
169
+ def favicon=: (String) -> String
170
+
171
+ attr_reader image: String?
172
+
173
+ def image=: (String) -> String
174
+
175
+ attr_reader json_ld: ::Array[::Hash[Symbol, top]]?
176
+
177
+ def json_ld=: (
178
+ ::Array[::Hash[Symbol, top]]
179
+ ) -> ::Array[::Hash[Symbol, top]]
180
+
181
+ attr_reader keywords: ::Array[String]?
182
+
183
+ def keywords=: (::Array[String]) -> ::Array[String]
184
+
185
+ attr_reader language: String?
186
+
187
+ def language=: (String) -> String
188
+
189
+ attr_reader modified_time: String?
190
+
191
+ def modified_time=: (String) -> String
192
+
193
+ attr_reader open_graph: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::open_graph]?
194
+
195
+ def open_graph=: (
196
+ ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::open_graph]
197
+ ) -> ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::open_graph]
198
+
199
+ attr_reader published_time: String?
200
+
201
+ def published_time=: (String) -> String
202
+
203
+ attr_reader robots: String?
204
+
205
+ def robots=: (String) -> String
206
+
207
+ attr_reader site_name: String?
208
+
209
+ def site_name=: (String) -> String
210
+
211
+ attr_reader title: String?
212
+
213
+ def title=: (String) -> String
214
+
215
+ attr_reader twitter: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::twitter]?
216
+
217
+ def twitter=: (
218
+ ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::twitter]
219
+ ) -> ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::twitter]
220
+
221
+ def initialize: (
222
+ final_url: String,
223
+ source_url: String,
224
+ ?additional_meta: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::additional_meta],
225
+ ?alternates: ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::Alternate],
226
+ ?author: String,
227
+ ?canonical_url: String,
228
+ ?description: String,
229
+ ?favicon: String,
230
+ ?image: String,
231
+ ?json_ld: ::Array[::Hash[Symbol, top]],
232
+ ?keywords: ::Array[String],
233
+ ?language: String,
234
+ ?modified_time: String,
235
+ ?open_graph: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::open_graph],
236
+ ?published_time: String,
237
+ ?robots: String,
238
+ ?site_name: String,
239
+ ?title: String,
240
+ ?twitter: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::twitter]
241
+ ) -> void
242
+
243
+ def to_hash: -> {
244
+ final_url: String,
245
+ source_url: String,
246
+ additional_meta: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::additional_meta],
247
+ alternates: ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::Alternate],
248
+ author: String,
249
+ canonical_url: String,
250
+ description: String,
251
+ favicon: String,
252
+ image: String,
253
+ json_ld: ::Array[::Hash[Symbol, top]],
254
+ keywords: ::Array[String],
255
+ language: String,
256
+ modified_time: String,
257
+ open_graph: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::open_graph],
258
+ published_time: String,
259
+ robots: String,
260
+ site_name: String,
261
+ title: String,
262
+ twitter: ::Hash[Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::twitter]
263
+ }
264
+
265
+ type additional_meta = String | ::Array[String]
266
+
267
+ module AdditionalMeta
268
+ extend ContextDev::Internal::Type::Union
269
+
270
+ def self?.variants: -> ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::additional_meta]
271
+
272
+ StringArray: ContextDev::Internal::Type::Converter
273
+ end
274
+
275
+ type alternate =
276
+ { href: String, hreflang: String, title: String, type: String }
277
+
278
+ class Alternate < ContextDev::Internal::Type::BaseModel
279
+ attr_accessor href: String
280
+
281
+ attr_reader hreflang: String?
282
+
283
+ def hreflang=: (String) -> String
284
+
285
+ attr_reader title: String?
286
+
287
+ def title=: (String) -> String
288
+
289
+ attr_reader type: String?
290
+
291
+ def type=: (String) -> String
292
+
293
+ def initialize: (
294
+ href: String,
295
+ ?hreflang: String,
296
+ ?title: String,
297
+ ?type: String
298
+ ) -> void
299
+
300
+ def to_hash: -> {
301
+ href: String,
302
+ hreflang: String,
303
+ title: String,
304
+ type: String
305
+ }
306
+ end
307
+
308
+ type open_graph = String | ::Array[String]
309
+
310
+ module OpenGraph
311
+ extend ContextDev::Internal::Type::Union
312
+
313
+ def self?.variants: -> ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::open_graph]
314
+
315
+ StringArray: ContextDev::Internal::Type::Converter
316
+ end
317
+
318
+ type twitter = String | ::Array[String]
319
+
320
+ module Twitter
321
+ extend ContextDev::Internal::Type::Union
322
+
323
+ def self?.variants: -> ::Array[ContextDev::Models::BatchGetResultsResponse::Data::Ok::Metadata::twitter]
324
+
325
+ StringArray: ContextDev::Internal::Type::Converter
326
+ end
327
+ end
328
+ end
329
+
330
+ type error =
331
+ {
332
+ error_code: String,
333
+ message: String,
334
+ status: :error,
335
+ url: String,
336
+ item_id: String,
337
+ meta: ::Hash[Symbol, top]
338
+ }
339
+
340
+ class Error < ContextDev::Internal::Type::BaseModel
341
+ attr_accessor error_code: String
342
+
343
+ attr_accessor message: String
344
+
345
+ attr_accessor status: :error
346
+
347
+ attr_accessor url: String
348
+
349
+ attr_reader item_id: String?
350
+
351
+ def item_id=: (String) -> String
352
+
353
+ attr_reader meta: ::Hash[Symbol, top]?
354
+
355
+ def meta=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
356
+
357
+ def initialize: (
358
+ error_code: String,
359
+ message: String,
360
+ url: String,
361
+ ?item_id: String,
362
+ ?meta: ::Hash[Symbol, top],
363
+ ?status: :error
364
+ ) -> void
365
+
366
+ def to_hash: -> {
367
+ error_code: String,
368
+ message: String,
369
+ status: :error,
370
+ url: String,
371
+ item_id: String,
372
+ meta: ::Hash[Symbol, top]
373
+ }
374
+ end
375
+
376
+ def self?.variants: -> ::Array[ContextDev::Models::BatchGetResultsResponse::data]
377
+ end
378
+
379
+ type key_metadata =
380
+ { credits_consumed: Integer, credits_remaining: Integer }
381
+
382
+ class KeyMetadata < ContextDev::Internal::Type::BaseModel
383
+ attr_accessor credits_consumed: Integer
384
+
385
+ attr_accessor credits_remaining: Integer
386
+
387
+ def initialize: (
388
+ credits_consumed: Integer,
389
+ credits_remaining: Integer
390
+ ) -> void
391
+
392
+ def to_hash: -> {
393
+ credits_consumed: Integer,
394
+ credits_remaining: Integer
395
+ }
396
+ end
397
+ end
398
+ end
399
+ end