gds-api-adapters 98.2.0 → 98.3.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/email_alert_api.rb +1 -1
- data/lib/gds_api/publishing_api.rb +5 -2
- data/lib/gds_api/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fe90caccd0306511c9dc18c06ded0c55e9fff82236a7e6db924fd0d2664111e
|
4
|
+
data.tar.gz: 03253a27d17e1cf9f6a1f92ee3712bf9cd3d73bb4fbc75dfc555b743ae8fcc96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1952f1cae5f6e0b910e40a12aab64734ebfbe7ee02668192739cc94c6ee981f1285c2aff008fea4ca6c30fff8c70362c1a470823a6ada842bd240ba17cc596e9
|
7
|
+
data.tar.gz: '01585c1f95ff8453cda4a9faa064dfd6a04d748ef4bf736fe3040c8fdb14a08b4ca0c3ac50e90193abc18369b1dc7e6c927fc0d3168164affca31472596346f7'
|
@@ -11,7 +11,7 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
11
11
|
# @param attributes [Hash] document_type, links, tags used to search existing subscriber lists
|
12
12
|
def find_or_create_subscriber_list(attributes)
|
13
13
|
present_fields = [attributes["content_id"], attributes["links"], attributes["tags"]].compact.count
|
14
|
-
if (present_fields > 1) &&
|
14
|
+
if (present_fields > 1) && attributes["tags"]
|
15
15
|
message = "Invalid attributes provided. Valid attributes are content_id only, tags only, links only, content_id AND links, or none."
|
16
16
|
raise ArgumentError, message
|
17
17
|
end
|
@@ -360,17 +360,20 @@ class GdsApi::PublishingApi < GdsApi::Base
|
|
360
360
|
#
|
361
361
|
# @param content_id [UUID]
|
362
362
|
# @param host_content_id [UUID]
|
363
|
+
# @param params [Hash]
|
363
364
|
#
|
364
365
|
# publishing_api.get_host_content_item_for_content_id(
|
365
366
|
# "4b148ebc-b2bb-40db-8e48-dd8cff363ff7",
|
366
367
|
# "10d91dd1-cc9d-4c4c-9540-219ebb8d4501",
|
368
|
+
# { locale: "en" }
|
367
369
|
# )
|
368
370
|
#
|
369
371
|
# @return [GdsApi::Response] A response containing the content item which embeds the target.
|
370
372
|
#
|
371
373
|
# @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
|
-
|
374
|
+
def get_host_content_item_for_content_id(content_id, host_content_id, params = {})
|
375
|
+
query = query_string(params)
|
376
|
+
get_json("#{endpoint}/v2/content/#{content_id}/host-content/#{host_content_id}#{query}")
|
374
377
|
end
|
375
378
|
|
376
379
|
def get_content_by_embedded_document(content_id, params = {})
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 98.
|
4
|
+
version: 98.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-03-12 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: addressable
|
@@ -267,14 +267,14 @@ dependencies:
|
|
267
267
|
requirements:
|
268
268
|
- - '='
|
269
269
|
- !ruby/object:Gem::Version
|
270
|
-
version: 5.0.
|
270
|
+
version: 5.0.9
|
271
271
|
type: :development
|
272
272
|
prerelease: false
|
273
273
|
version_requirements: !ruby/object:Gem::Requirement
|
274
274
|
requirements:
|
275
275
|
- - '='
|
276
276
|
- !ruby/object:Gem::Version
|
277
|
-
version: 5.0.
|
277
|
+
version: 5.0.9
|
278
278
|
- !ruby/object:Gem::Dependency
|
279
279
|
name: simplecov
|
280
280
|
requirement: !ruby/object:Gem::Requirement
|
@@ -399,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
399
399
|
- !ruby/object:Gem::Version
|
400
400
|
version: '0'
|
401
401
|
requirements: []
|
402
|
-
rubygems_version: 3.6.
|
402
|
+
rubygems_version: 3.6.5
|
403
403
|
specification_version: 4
|
404
404
|
summary: Adapters to work with GDS APIs
|
405
405
|
test_files: []
|