gds-api-adapters 51.2.0 → 51.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: 13bc5ea4fc372321c69ee203e127d0085826a0f298a570567872738ad67a6282
4
- data.tar.gz: 3d5941c5f8cc9d998e2c40c7c5f4b2ebd2ef245bf7685046ba052987af142a2c
3
+ metadata.gz: 025e6a649d4f1940491de92e2d286f0dc77608e7e882400b513754c5a4b4e544
4
+ data.tar.gz: bda890f99474a20ac6d227b81795a4ac487727acd12f9b21aa4955df6fa75086
5
5
  SHA512:
6
- metadata.gz: 3c77fd55ff062baf4329a301fffabc9d8fdf6593e7c3a66ebe3763ffdf27bb962d2b2279c0d9e3506f160fe741042126800a9ae0cc0219774369efb96f66152b
7
- data.tar.gz: 8522b34d180b03fa7e538dedc6ba22ce7495686e49d42d78f1664b90b34c717cd8fcf747a4476618b341b5febf800fbfb5886aa26701673a3c7fd9dd6955ff55
6
+ metadata.gz: 3465711725c9681dc50dd9ddcee75edfd9d7ff4b034f16236e7bd79544f26dff5086c894177311816eb27e6a27b3e5a683de5f5be3bfa8ce9cb3b05c90a07d5d
7
+ data.tar.gz: 83b9d03c3861f2c96b104082b2f8505f8216d9800fb28941a668ad280f459f6946321d127644279229dff2fecd98ae33589573789cdf1eb61a8465a9a5700008
@@ -235,6 +235,7 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
235
235
  # Return the expanded links of the item.
236
236
  #
237
237
  # @param content_id [UUID]
238
+ # @param locale [String] Locale with which to generate the expanded links. Unless this is specified, the default locale (`en`) in the Publishing API will be used.
238
239
  # @param with_drafts [Bool] Whether links to draft-only editions are returned, defaulting to `true`.
239
240
  # @param generate [Bool] Whether to require publishing-api to generate the expanded links, which may be slow. Defaults to `false`.
240
241
  #
@@ -255,10 +256,11 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
255
256
  # }
256
257
  #
257
258
  # @see https://github.com/alphagov/publishing-api/blob/master/doc/api.md#get-v2expanded-linkscontent_id
258
- def get_expanded_links(content_id, with_drafts: true, generate: false)
259
+ def get_expanded_links(content_id, locale: nil, with_drafts: true, generate: false)
259
260
  params = {}
260
261
  params[:with_drafts] = "false" unless with_drafts
261
262
  params[:generate] = "true" if generate
263
+ params[:locale] = locale if locale
262
264
  query = query_string(params)
263
265
  validate_content_id(content_id)
264
266
  get_json("#{endpoint}/v2/expanded-links/#{content_id}#{query}")
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '51.2.0'.freeze
2
+ VERSION = '51.3.0'.freeze
3
3
  end
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: 51.2.0
4
+ version: 51.3.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: 2018-02-02 00:00:00.000000000 Z
11
+ date: 2018-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek