gds-api-adapters 30.6.0 → 30.7.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 +13 -8
- 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: 064cd4856dcc20ae2d7df9291f05bf3349540541
|
4
|
+
data.tar.gz: 523af1652d26cf7c5c7734f251108f35684886dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aef4b12fb99ddee3eecf500f20476cc6aab3d68af7c1f9a513d3f9ad17ac7bd1fc72d9ecb42f8e61d82846dde898564a3d7cf73840c639cd13670b0e06932564
|
7
|
+
data.tar.gz: 175dce5f7b0f3fa6efb067e2dd33611c0600e9a6503ddb518035bd7913b467d07b2bbb9272aa156827296d3ee5195a95f9e2c4127182dd69ce64835cf9be0080
|
@@ -195,26 +195,31 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
195
195
|
# Patch the links of a content item
|
196
196
|
#
|
197
197
|
# @param content_id [UUID]
|
198
|
-
# @param
|
198
|
+
# @param params [Hash]
|
199
|
+
# @option params [Hash] links A "links hash"
|
200
|
+
# @option params [Integer] previous_version The previous version (returned by `get_links`). If this version is not the current version, the publishing-api will reject the change and return 409 Conflict. (optional)
|
201
|
+
# @option params [Boolean] bulk_publishing Set to true to indicate that this is part of a mass-republish. Allows the publishing-api to prioritise human-initiated publishing (optional, default false)
|
199
202
|
# @example
|
200
203
|
#
|
201
204
|
# publishing_api.patch_links(
|
202
205
|
# '86963c13-1f57-4005-b119-e7cf3cb92ecf',
|
203
|
-
# {
|
206
|
+
# links: {
|
204
207
|
# topics: ['d6e1527d-d0c0-40d5-9603-b9f3e6866b8a'],
|
205
208
|
# mainstream_browse_pages: ['d6e1527d-d0c0-40d5-9603-b9f3e6866b8a'],
|
206
|
-
# }
|
209
|
+
# },
|
210
|
+
# previous_version: 10,
|
211
|
+
# bulk_publishing: true
|
207
212
|
# )
|
208
213
|
#
|
209
214
|
# @see https://github.com/alphagov/publishing-api/blob/master/doc/publishing-api-syntactic-usage.md#patch-v2linkscontent_id
|
210
|
-
def patch_links(content_id,
|
211
|
-
|
212
|
-
links:
|
215
|
+
def patch_links(content_id, params)
|
216
|
+
payload = {
|
217
|
+
links: params.fetch(:links)
|
213
218
|
}
|
214
219
|
|
215
|
-
|
220
|
+
payload = merge_optional_keys(payload, params, [:previous_version, :bulk_publishing])
|
216
221
|
|
217
|
-
patch_json!(links_url(content_id),
|
222
|
+
patch_json!(links_url(content_id), payload)
|
218
223
|
end
|
219
224
|
|
220
225
|
# FIXME: Add documentation
|
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: 30.
|
4
|
+
version: 30.7.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: 2016-05-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|