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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4e28b623478c809c5e960c46012dc514ff8205e
4
- data.tar.gz: 7945f3261866b017b6765f057dca650585761f81
3
+ metadata.gz: 064cd4856dcc20ae2d7df9291f05bf3349540541
4
+ data.tar.gz: 523af1652d26cf7c5c7734f251108f35684886dc
5
5
  SHA512:
6
- metadata.gz: 7226bc20099596193ef8e9b3c414a4a075fc45f28d8464ec15b4ab683f820d8715f117c5bb8930d34b970b62194fdb5650523cd026e11a86d8d7eec6b9fd9ad5
7
- data.tar.gz: ceeb159b50485e441b1db84076b582bbb080a570637ced31fdb2931d1c0ffb4237257e3f22884cc5591771df7eb84aa9b4be8b7e27ab6c40607539b6fc6d5a67
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 payload [Hash] A "links hash"
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, payload)
211
- params = {
212
- links: payload.fetch(:links)
215
+ def patch_links(content_id, params)
216
+ payload = {
217
+ links: params.fetch(:links)
213
218
  }
214
219
 
215
- params = merge_optional_keys(params, payload, [:previous_version])
220
+ payload = merge_optional_keys(payload, params, [:previous_version, :bulk_publishing])
216
221
 
217
- patch_json!(links_url(content_id), params)
222
+ patch_json!(links_url(content_id), payload)
218
223
  end
219
224
 
220
225
  # FIXME: Add documentation
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '30.6.0'
2
+ VERSION = '30.7.0'
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: 30.6.0
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-25 00:00:00.000000000 Z
11
+ date: 2016-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek