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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51c7c6ffe18c5c3e712794c4d3fe5e3ae59009d4b48aa0b271ef3603aae8c12e
4
- data.tar.gz: 18eef9cf5a8ff6a3a5f4378ae5ae312c4480c5ed959a4f482202422fe30228f0
3
+ metadata.gz: 1fe90caccd0306511c9dc18c06ded0c55e9fff82236a7e6db924fd0d2664111e
4
+ data.tar.gz: 03253a27d17e1cf9f6a1f92ee3712bf9cd3d73bb4fbc75dfc555b743ae8fcc96
5
5
  SHA512:
6
- metadata.gz: 978ddb8ee98fa3b2d077d293c35fd483e5316e3eb687f0cb7cd9f60f49687f136721b43eda266dbb963429ad1365aad7e327a744aa5d67a9beee295a525456d5
7
- data.tar.gz: 4f6f6407912450e38293d8c9014c38898df6902701ab0319784cef83bbe8e951da77e623e345a29e12802ecb518f788a1f859945ae1d569dd5ab5c812f23a1ab
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) && (attributes["tags"])
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
- get_json("#{endpoint}/v2/content/#{content_id}/host-content/#{host_content_id}")
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 = {})
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "98.2.0".freeze
2
+ VERSION = "98.3.0".freeze
3
3
  end
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.2.0
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-01-06 00:00:00.000000000 Z
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.7
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.7
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.2
402
+ rubygems_version: 3.6.5
403
403
  specification_version: 4
404
404
  summary: Adapters to work with GDS APIs
405
405
  test_files: []