gds-api-adapters 97.4.1 → 97.6.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/lib/gds_api/publishing_api.rb +19 -2
- data/lib/gds_api/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 546bac9e86b385628f50ab89c8bc1f619fe7517f4cecea5d1ca373c1df2fe7c3
|
4
|
+
data.tar.gz: 1f51515b81f17c573cf1c69b1c15cc5dbc3e59d6af20ce48d00b3819ae7e5857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0ffc11729c1b4a907eaa57d777c862b481bcbd64570aa0d4b2135d0d0bf012761df48afcc96527631d7bd4a4980d0c5b24a516e16d56d744ac5e8d360b927f0
|
7
|
+
data.tar.gz: 6c63c18fe23adced762bdf531ffd304d61cb3631617229bed9171052306676a1b5779453608b682e847183558db38e2a0235298b0694143825cc477cc4213a65
|
@@ -356,6 +356,23 @@ class GdsApi::PublishingApi < GdsApi::Base
|
|
356
356
|
get_json("#{endpoint}/v2/content/#{content_id}/host-content#{query}")
|
357
357
|
end
|
358
358
|
|
359
|
+
# Get a specific content item which embeds a reusable content_id
|
360
|
+
#
|
361
|
+
# @param content_id [UUID]
|
362
|
+
# @param host_content_id [UUID]
|
363
|
+
#
|
364
|
+
# publishing_api.get_host_content_item_for_content_id(
|
365
|
+
# "4b148ebc-b2bb-40db-8e48-dd8cff363ff7",
|
366
|
+
# "10d91dd1-cc9d-4c4c-9540-219ebb8d4501",
|
367
|
+
# )
|
368
|
+
#
|
369
|
+
# @return [GdsApi::Response] A response containing the content item which embeds the target.
|
370
|
+
#
|
371
|
+
# @see https://github.com/alphagov/publishing-api/blob/main/docs/api.md#get-v2contentcontent_idhost-contenthost_content_id
|
372
|
+
def get_host_content_item_for_content_id(content_id, host_content_id)
|
373
|
+
get_json("#{endpoint}/v2/content/#{content_id}/host-content/#{host_content_id}")
|
374
|
+
end
|
375
|
+
|
359
376
|
def get_content_by_embedded_document(content_id, params = {})
|
360
377
|
warn "GdsAPI::PublishingApi: #get_content_by_embedded_document deprecated (please use #get_host_content_for_content_id)"
|
361
378
|
get_host_content_for_content_id(content_id, params)
|
@@ -562,9 +579,9 @@ class GdsApi::PublishingApi < GdsApi::Base
|
|
562
579
|
#
|
563
580
|
# @param query [String]
|
564
581
|
#
|
565
|
-
# @return [
|
582
|
+
# @return [GdsApi::Response] A response with the result of the GraphQL query.
|
566
583
|
def graphql_query(query)
|
567
|
-
post_json("#{endpoint}/graphql", query:)
|
584
|
+
post_json("#{endpoint}/graphql", query:)
|
568
585
|
end
|
569
586
|
|
570
587
|
private
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 97.
|
4
|
+
version: 97.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -268,14 +268,14 @@ dependencies:
|
|
268
268
|
requirements:
|
269
269
|
- - '='
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version: 5.0.
|
271
|
+
version: 5.0.5
|
272
272
|
type: :development
|
273
273
|
prerelease: false
|
274
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
276
|
- - '='
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version: 5.0.
|
278
|
+
version: 5.0.5
|
279
279
|
- !ruby/object:Gem::Dependency
|
280
280
|
name: simplecov
|
281
281
|
requirement: !ruby/object:Gem::Requirement
|