gds-api-adapters 37.4.0 → 37.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gds_api/publishing_api_v2.rb +9 -7
- 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: a6605bc5855ecb13e79667aa0b469918b57c1f69
|
4
|
+
data.tar.gz: 7ec49def047a41ac5278175bc0b0f54bdae69be7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 210882ae9dc87120936a8842cf3495fd154670dd97d52de27012044947f4346a30a5147ae7d77cc28525c14d7399c8c7f40c5a50b49ed27a77331c778557c37f
|
7
|
+
data.tar.gz: f080ccb5851c2594effa49897c9023f1ea7ee37121383ee7f4dbeef40c172c5ae4e1718a0b15b7203aa322554f06342a06cb92edb8d60661dc04ab88f7723b20
|
@@ -119,19 +119,21 @@ class GdsApi::PublishingApiV2 < GdsApi::Base
|
|
119
119
|
# @param discard_drafts [Boolean] (optional) Whether to discard drafts on that item. Defaults to false.
|
120
120
|
# @param previous_version [Integer] (optional) A lock version number for optimistic locking.
|
121
121
|
# @param locale [String] (optional) The content item locale.
|
122
|
+
# @param unpublished_at [Time] (optional) The time the content was withdrawn. Ignored for types other than withdrawn
|
122
123
|
#
|
123
124
|
# @see https://github.com/alphagov/publishing-api/blob/master/doc/api.md#post-v2contentcontent_idunpublish
|
124
|
-
def unpublish(content_id, type:, explanation: nil, alternative_path: nil, discard_drafts: false, allow_draft: false, previous_version: nil, locale: nil)
|
125
|
+
def unpublish(content_id, type:, explanation: nil, alternative_path: nil, discard_drafts: false, allow_draft: false, previous_version: nil, locale: nil, unpublished_at: nil)
|
125
126
|
params = {
|
126
127
|
type: type
|
127
128
|
}
|
128
129
|
|
129
|
-
params
|
130
|
-
params
|
131
|
-
params
|
132
|
-
params
|
133
|
-
params
|
134
|
-
params
|
130
|
+
params[:explanation] = explanation if explanation
|
131
|
+
params[:alternative_path] = alternative_path if alternative_path
|
132
|
+
params[:previous_version] = previous_version if previous_version
|
133
|
+
params[:discard_drafts] = discard_drafts if discard_drafts
|
134
|
+
params[:allow_draft] = allow_draft if allow_draft
|
135
|
+
params[:locale] = locale if locale
|
136
|
+
params[:unpublished_at] = unpublished_at.utc.iso8601 if unpublished_at
|
135
137
|
|
136
138
|
post_json!(unpublish_url(content_id), params)
|
137
139
|
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: 37.
|
4
|
+
version: 37.5.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-10-
|
11
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|