gds-api-adapters 47.5.0 → 47.6.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 +7 -5
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae0dd1b0adbf3a001fadccdbe68dea76ff09bf27
|
4
|
+
data.tar.gz: 85eb9fa08bad4fb4e05cddaea9652af4f3bcb09c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac731345787b7b273faf175da76b8842ce8723e8b09f5258ec9f057204ea02beef49861d93d5cac212fa7be8b0b5b3a8dd86fb711e2b51749021bcfa414e8849
|
7
|
+
data.tar.gz: 773dcbee4272c367b68bce82894822f735c5a1555e7a320d435e81faf043824d1d14d0bbdf23528cd6e0174ab3d8b479eb5e115a29a377a10e822e1902861edb
|
@@ -35,7 +35,7 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
35
35
|
|
36
36
|
# @private
|
37
37
|
def get_content!(*)
|
38
|
-
raise "`PublishingApiV2#
|
38
|
+
raise "`PublishingApiV2#get_content!` is deprecated. Use `PublishingApiV2#get_content`"
|
39
39
|
end
|
40
40
|
|
41
41
|
# Find the content_ids for a list of base_paths.
|
@@ -211,14 +211,14 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
211
211
|
#
|
212
212
|
# @param content_id [UUID]
|
213
213
|
# @param with_drafts [Bool] Whether links to draft-only editions are returned, defaulting to `true`.
|
214
|
+
# @param generate [Bool] Whether to require publishing-api to generate the expanded links, which may be slow. Defaults to `false`.
|
214
215
|
#
|
215
216
|
# @example
|
216
217
|
#
|
217
218
|
# publishing_api.get_expanded_links("8157589b-65e2-4df6-92ba-2c91d80006c0", with_drafts: false).to_h
|
218
219
|
#
|
219
220
|
# #=> {
|
220
|
-
# "
|
221
|
-
# "version" => 10,
|
221
|
+
# "generated" => "2017-08-01T10:42:49Z",
|
222
222
|
# "expanded_links" => {
|
223
223
|
# "organisations" => [
|
224
224
|
# {
|
@@ -230,8 +230,10 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
230
230
|
# }
|
231
231
|
#
|
232
232
|
# @see https://github.com/alphagov/publishing-api/blob/master/doc/api.md#get-v2expanded-linkscontent_id
|
233
|
-
def get_expanded_links(content_id, with_drafts: true)
|
234
|
-
params =
|
233
|
+
def get_expanded_links(content_id, with_drafts: true, generate: false)
|
234
|
+
params = {}
|
235
|
+
params[:with_drafts] = "false" unless with_drafts
|
236
|
+
params[:generate] = "true" if generate
|
235
237
|
query = query_string(params)
|
236
238
|
validate_content_id(content_id)
|
237
239
|
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: 47.
|
4
|
+
version: 47.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Stewart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|