gds-api-adapters 40.0.0 → 40.1.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 275b6c8cdde4e2c6ef3e29c9c97e71e9964b07c6
|
4
|
+
data.tar.gz: 6fa7a308ebd3a1ad9f0943d155774c61474e89be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbf049cf1ce737618b48003940ed4227de4adeeb45c7887fb06111a3f9be14aa76c1f81b656a82b97697cc4127d2f25ca26b410babe608ca47628c217295fc70
|
7
|
+
data.tar.gz: ebaa6745b6e1b1377e1aef1d1b91550aaa0ddacb232a62693f8c56aafb1b1ce7de79e7d74dac4e8c3b4c30f5967f56a9496a9908e10b55b219d99e8413ede9d4
|
@@ -129,9 +129,10 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
129
129
|
# @param previous_version [Integer] (optional) A lock version number for optimistic locking.
|
130
130
|
# @param locale [String] (optional) The content item locale.
|
131
131
|
# @param unpublished_at [Time] (optional) The time the content was withdrawn. Ignored for types other than withdrawn
|
132
|
+
# @param redirects [Array] (optional) Required if no alternative_path is given. An array of redirect values, ie: { path:, type:, destination: }
|
132
133
|
#
|
133
134
|
# @see https://github.com/alphagov/publishing-api/blob/master/doc/api.md#post-v2contentcontent_idunpublish
|
134
|
-
def unpublish(content_id, type:, explanation: nil, alternative_path: nil, discard_drafts: false, allow_draft: false, previous_version: nil, locale: nil, unpublished_at: nil)
|
135
|
+
def unpublish(content_id, type:, explanation: nil, alternative_path: nil, discard_drafts: false, allow_draft: false, previous_version: nil, locale: nil, unpublished_at: nil, redirects: nil)
|
135
136
|
params = {
|
136
137
|
type: type
|
137
138
|
}
|
@@ -143,6 +144,7 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
143
144
|
params[:allow_draft] = allow_draft if allow_draft
|
144
145
|
params[:locale] = locale if locale
|
145
146
|
params[:unpublished_at] = unpublished_at.utc.iso8601 if unpublished_at
|
147
|
+
params[:redirects] = redirects if redirects
|
146
148
|
|
147
149
|
post_json(unpublish_url(content_id), params)
|
148
150
|
end
|
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: 40.
|
4
|
+
version: 40.1.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-02-
|
11
|
+
date: 2017-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|