gds-api-adapters 51.2.0 → 51.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gds_api/publishing_api_v2.rb +3 -1
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025e6a649d4f1940491de92e2d286f0dc77608e7e882400b513754c5a4b4e544
|
4
|
+
data.tar.gz: bda890f99474a20ac6d227b81795a4ac487727acd12f9b21aa4955df6fa75086
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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}")
|
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: 51.
|
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-
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|