Skip to content

Commit 12707d0

Browse files
author
stlc-bot
committed
feat(scrape): read framework-embedded page data in the json format (#2405)
Stainless-Generated-From: eb2ce7bb2620138ebd5a578a5052044ab603468d
1 parent 4596198 commit 12707d0

12 files changed

Lines changed: 72 additions & 28 deletions

‎lib/context_dev/models/batch_cancel_response.rb‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ class Formats < ContextDev::Internal::Type::BaseModel
155155
optional :images, ContextDev::Internal::Type::Boolean
156156

157157
# @!attribute json
158-
# An object matching `jsonParams.schema`, extracted from the page.
158+
# An object matching `jsonParams.schema`, extracted from the page text and its
159+
# embedded data (JSON-LD, meta tags, framework state).
159160
#
160161
# @return [Boolean, nil]
161162
optional :json, ContextDev::Internal::Type::Boolean
@@ -185,6 +186,9 @@ class Formats < ContextDev::Internal::Type::BaseModel
185186
optional :screenshot, ContextDev::Internal::Type::Boolean
186187

187188
# @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
189+
# Some parameter documentations has been truncated, see
190+
# {ContextDev::Models::BatchCancelResponse::Formats} for more details.
191+
#
188192
# Outputs requested for each page. Matches input.data.formats on submission.
189193
#
190194
# @param bytes [Boolean] The original HTTP response body.
@@ -195,7 +199,7 @@ class Formats < ContextDev::Internal::Type::BaseModel
195199
#
196200
# @param images [Boolean] Images found on the page.
197201
#
198-
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
202+
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page text and its emb
199203
#
200204
# @param markdown [Boolean] Page content as Markdown.
201205
#

‎lib/context_dev/models/batch_list_response.rb‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ class Formats < ContextDev::Internal::Type::BaseModel
236236
optional :images, ContextDev::Internal::Type::Boolean
237237

238238
# @!attribute json
239-
# An object matching `jsonParams.schema`, extracted from the page.
239+
# An object matching `jsonParams.schema`, extracted from the page text and its
240+
# embedded data (JSON-LD, meta tags, framework state).
240241
#
241242
# @return [Boolean, nil]
242243
optional :json, ContextDev::Internal::Type::Boolean
@@ -266,6 +267,9 @@ class Formats < ContextDev::Internal::Type::BaseModel
266267
optional :screenshot, ContextDev::Internal::Type::Boolean
267268

268269
# @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
270+
# Some parameter documentations has been truncated, see
271+
# {ContextDev::Models::BatchListResponse::Data::Formats} for more details.
272+
#
269273
# Outputs requested for each page. Matches input.data.formats on submission.
270274
#
271275
# @param bytes [Boolean] The original HTTP response body.
@@ -276,7 +280,7 @@ class Formats < ContextDev::Internal::Type::BaseModel
276280
#
277281
# @param images [Boolean] Images found on the page.
278282
#
279-
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
283+
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page text and its emb
280284
#
281285
# @param markdown [Boolean] Page content as Markdown.
282286
#

‎lib/context_dev/models/batch_retrieve_response.rb‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ class Formats < ContextDev::Internal::Type::BaseModel
222222
optional :images, ContextDev::Internal::Type::Boolean
223223

224224
# @!attribute json
225-
# An object matching `jsonParams.schema`, extracted from the page.
225+
# An object matching `jsonParams.schema`, extracted from the page text and its
226+
# embedded data (JSON-LD, meta tags, framework state).
226227
#
227228
# @return [Boolean, nil]
228229
optional :json, ContextDev::Internal::Type::Boolean
@@ -252,6 +253,9 @@ class Formats < ContextDev::Internal::Type::BaseModel
252253
optional :screenshot, ContextDev::Internal::Type::Boolean
253254

254255
# @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
256+
# Some parameter documentations has been truncated, see
257+
# {ContextDev::Models::BatchRetrieveResponse::Formats} for more details.
258+
#
255259
# Outputs requested for each page. Matches input.data.formats on submission.
256260
#
257261
# @param bytes [Boolean] The original HTTP response body.
@@ -262,7 +266,7 @@ class Formats < ContextDev::Internal::Type::BaseModel
262266
#
263267
# @param images [Boolean] Images found on the page.
264268
#
265-
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
269+
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page text and its emb
266270
#
267271
# @param markdown [Boolean] Page content as Markdown.
268272
#

‎lib/context_dev/models/batch_submit_params.rb‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,8 @@ class Formats < ContextDev::Internal::Type::BaseModel
12031203
optional :images, ContextDev::Internal::Type::Boolean
12041204

12051205
# @!attribute json
1206-
# An object matching `jsonParams.schema`, extracted from the page.
1206+
# An object matching `jsonParams.schema`, extracted from the page text and its
1207+
# embedded data (JSON-LD, meta tags, framework state).
12071208
#
12081209
# @return [Boolean, nil]
12091210
optional :json, ContextDev::Internal::Type::Boolean
@@ -1233,6 +1234,10 @@ class Formats < ContextDev::Internal::Type::BaseModel
12331234
optional :screenshot, ContextDev::Internal::Type::Boolean
12341235

12351236
# @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
1237+
# Some parameter documentations has been truncated, see
1238+
# {ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::BatchUnifiedScrapeData::Formats}
1239+
# for more details.
1240+
#
12361241
# Outputs to return. Set at least one to `true`.
12371242
#
12381243
# @param bytes [Boolean] The original HTTP response body.
@@ -1243,7 +1248,7 @@ class Formats < ContextDev::Internal::Type::BaseModel
12431248
#
12441249
# @param images [Boolean] Images found on the page.
12451250
#
1246-
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
1251+
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page text and its emb
12471252
#
12481253
# @param markdown [Boolean] Page content as Markdown.
12491254
#
@@ -4357,7 +4362,8 @@ class Formats < ContextDev::Internal::Type::BaseModel
43574362
optional :images, ContextDev::Internal::Type::Boolean
43584363

43594364
# @!attribute json
4360-
# An object matching `jsonParams.schema`, extracted from the page.
4365+
# An object matching `jsonParams.schema`, extracted from the page text and its
4366+
# embedded data (JSON-LD, meta tags, framework state).
43614367
#
43624368
# @return [Boolean, nil]
43634369
optional :json, ContextDev::Internal::Type::Boolean
@@ -4387,6 +4393,10 @@ class Formats < ContextDev::Internal::Type::BaseModel
43874393
optional :screenshot, ContextDev::Internal::Type::Boolean
43884394

43894395
# @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
4396+
# Some parameter documentations has been truncated, see
4397+
# {ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::BatchUnifiedCrawlData::Formats}
4398+
# for more details.
4399+
#
43904400
# Outputs to return. Set at least one to `true`.
43914401
#
43924402
# @param bytes [Boolean] The original HTTP response body.
@@ -4397,7 +4407,7 @@ class Formats < ContextDev::Internal::Type::BaseModel
43974407
#
43984408
# @param images [Boolean] Images found on the page.
43994409
#
4400-
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
4410+
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page text and its emb
44014411
#
44024412
# @param markdown [Boolean] Page content as Markdown.
44034413
#

‎lib/context_dev/models/batch_submit_response.rb‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ class Formats < ContextDev::Internal::Type::BaseModel
204204
optional :images, ContextDev::Internal::Type::Boolean
205205

206206
# @!attribute json
207-
# An object matching `jsonParams.schema`, extracted from the page.
207+
# An object matching `jsonParams.schema`, extracted from the page text and its
208+
# embedded data (JSON-LD, meta tags, framework state).
208209
#
209210
# @return [Boolean, nil]
210211
optional :json, ContextDev::Internal::Type::Boolean
@@ -234,6 +235,9 @@ class Formats < ContextDev::Internal::Type::BaseModel
234235
optional :screenshot, ContextDev::Internal::Type::Boolean
235236

236237
# @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
238+
# Some parameter documentations has been truncated, see
239+
# {ContextDev::Models::BatchSubmitResponse::Formats} for more details.
240+
#
237241
# Outputs requested for each page. Matches input.data.formats on submission.
238242
#
239243
# @param bytes [Boolean] The original HTTP response body.
@@ -244,7 +248,7 @@ class Formats < ContextDev::Internal::Type::BaseModel
244248
#
245249
# @param images [Boolean] Images found on the page.
246250
#
247-
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
251+
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page text and its emb
248252
#
249253
# @param markdown [Boolean] Page content as Markdown.
250254
#

‎lib/context_dev/models/web_scrape_params.rb‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ class Formats < ContextDev::Internal::Type::BaseModel
164164
optional :images, ContextDev::Internal::Type::Boolean
165165

166166
# @!attribute json
167-
# An object matching `jsonParams.schema`, extracted from the page.
167+
# An object matching `jsonParams.schema`, extracted from the page text and its
168+
# embedded data (JSON-LD, meta tags, framework state).
168169
#
169170
# @return [Boolean, nil]
170171
optional :json, ContextDev::Internal::Type::Boolean
@@ -194,6 +195,9 @@ class Formats < ContextDev::Internal::Type::BaseModel
194195
optional :screenshot, ContextDev::Internal::Type::Boolean
195196

196197
# @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
198+
# Some parameter documentations has been truncated, see
199+
# {ContextDev::Models::WebScrapeParams::Formats} for more details.
200+
#
197201
# Outputs to return. Set at least one to `true`.
198202
#
199203
# @param bytes [Boolean] The original HTTP response body.
@@ -204,7 +208,7 @@ class Formats < ContextDev::Internal::Type::BaseModel
204208
#
205209
# @param images [Boolean] Images found on the page.
206210
#
207-
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
211+
# @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page text and its emb
208212
#
209213
# @param markdown [Boolean] Page content as Markdown.
210214
#

‎rbi/context_dev/models/batch_cancel_response.rbi‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ module ContextDev
249249
sig { params(images: T::Boolean).void }
250250
attr_writer :images
251251

252-
# An object matching `jsonParams.schema`, extracted from the page.
252+
# An object matching `jsonParams.schema`, extracted from the page text and its
253+
# embedded data (JSON-LD, meta tags, framework state).
253254
sig { returns(T.nilable(T::Boolean)) }
254255
attr_reader :json
255256

@@ -307,7 +308,8 @@ module ContextDev
307308
html: nil,
308309
# Images found on the page.
309310
images: nil,
310-
# An object matching `jsonParams.schema`, extracted from the page.
311+
# An object matching `jsonParams.schema`, extracted from the page text and its
312+
# embedded data (JSON-LD, meta tags, framework state).
311313
json: nil,
312314
# Page content as Markdown.
313315
markdown: nil,

‎rbi/context_dev/models/batch_list_response.rbi‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ module ContextDev
410410
sig { params(images: T::Boolean).void }
411411
attr_writer :images
412412

413-
# An object matching `jsonParams.schema`, extracted from the page.
413+
# An object matching `jsonParams.schema`, extracted from the page text and its
414+
# embedded data (JSON-LD, meta tags, framework state).
414415
sig { returns(T.nilable(T::Boolean)) }
415416
attr_reader :json
416417

@@ -468,7 +469,8 @@ module ContextDev
468469
html: nil,
469470
# Images found on the page.
470471
images: nil,
471-
# An object matching `jsonParams.schema`, extracted from the page.
472+
# An object matching `jsonParams.schema`, extracted from the page text and its
473+
# embedded data (JSON-LD, meta tags, framework state).
472474
json: nil,
473475
# Page content as Markdown.
474476
markdown: nil,

‎rbi/context_dev/models/batch_retrieve_response.rbi‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ module ContextDev
359359
sig { params(images: T::Boolean).void }
360360
attr_writer :images
361361

362-
# An object matching `jsonParams.schema`, extracted from the page.
362+
# An object matching `jsonParams.schema`, extracted from the page text and its
363+
# embedded data (JSON-LD, meta tags, framework state).
363364
sig { returns(T.nilable(T::Boolean)) }
364365
attr_reader :json
365366

@@ -417,7 +418,8 @@ module ContextDev
417418
html: nil,
418419
# Images found on the page.
419420
images: nil,
420-
# An object matching `jsonParams.schema`, extracted from the page.
421+
# An object matching `jsonParams.schema`, extracted from the page text and its
422+
# embedded data (JSON-LD, meta tags, framework state).
421423
json: nil,
422424
# Page content as Markdown.
423425
markdown: nil,

‎rbi/context_dev/models/batch_submit_params.rbi‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,7 +3570,8 @@ module ContextDev
35703570
sig { params(images: T::Boolean).void }
35713571
attr_writer :images
35723572

3573-
# An object matching `jsonParams.schema`, extracted from the page.
3573+
# An object matching `jsonParams.schema`, extracted from the page text and its
3574+
# embedded data (JSON-LD, meta tags, framework state).
35743575
sig { returns(T.nilable(T::Boolean)) }
35753576
attr_reader :json
35763577

@@ -3628,7 +3629,8 @@ module ContextDev
36283629
html: nil,
36293630
# Images found on the page.
36303631
images: nil,
3631-
# An object matching `jsonParams.schema`, extracted from the page.
3632+
# An object matching `jsonParams.schema`, extracted from the page text and its
3633+
# embedded data (JSON-LD, meta tags, framework state).
36323634
json: nil,
36333635
# Page content as Markdown.
36343636
markdown: nil,
@@ -11624,7 +11626,8 @@ module ContextDev
1162411626
sig { params(images: T::Boolean).void }
1162511627
attr_writer :images
1162611628

11627-
# An object matching `jsonParams.schema`, extracted from the page.
11629+
# An object matching `jsonParams.schema`, extracted from the page text and its
11630+
# embedded data (JSON-LD, meta tags, framework state).
1162811631
sig { returns(T.nilable(T::Boolean)) }
1162911632
attr_reader :json
1163011633

@@ -11682,7 +11685,8 @@ module ContextDev
1168211685
html: nil,
1168311686
# Images found on the page.
1168411687
images: nil,
11685-
# An object matching `jsonParams.schema`, extracted from the page.
11688+
# An object matching `jsonParams.schema`, extracted from the page text and its
11689+
# embedded data (JSON-LD, meta tags, framework state).
1168611690
json: nil,
1168711691
# Page content as Markdown.
1168811692
markdown: nil,

0 commit comments

Comments
 (0)