springcm-sdk 1.2.0 → 1.3.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
  SHA256:
3
- metadata.gz: 22ec13117031daaf638d3833204abb76fae44fcdb442641bf3c9d58b4259cebc
4
- data.tar.gz: 18e0531670b293bfc5d9712bd0bcbd1b63848976631fabd9bf32c117bf47cd83
3
+ metadata.gz: aaa2b726b9c333c01ecf0c2aa2c19cd08b9cd6b9d763f3a43c9463044d3af1ca
4
+ data.tar.gz: 0cc575aef6d4a8de3086329322d0c6c921ab579ce0a7fe4e1303286f5deb93eb
5
5
  SHA512:
6
- metadata.gz: da566b1acdee33d54ac19ae64a3887f30201897a6774e6506721ee39c8d894e6261c17e43243b6e70a2fa4c9903f938f456a776e34b42e71a922db97190adf20
7
- data.tar.gz: a890420ebed58f4bc1d0c0a8898a35208362742637629146a623b8d197124d92f05c3c37eb643678ef236cf21d5a30db3aba2844272f89a6e7d281695688f2a0
6
+ metadata.gz: 62a11463516663e036023e3f8b2a865417a623f789708df074334a2c97ef2a9b1a70fe18810611285fd1ee6d8d346d542ef9b8c630a6b6252ef0913dfc542d72
7
+ data.tar.gz: 9b341bc87947f9e1e7fbea4886b122f2d83e4237d078edb014dc86c425dd07755a5e7176e74e8044dbe196f4e02c865e135fb0bd17e8bf5ff4bdfbad9dfcbdff
@@ -3,6 +3,9 @@
3
3
  All notable changes to springcm-sdk will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
+ ## [1.3.0] - 2020-03-24
7
+ ### Added
8
+ * Folder#create_folder method
6
9
 
7
10
  ## [1.2.0] - 2020-03-20 🎂
8
11
  ### Added
@@ -152,7 +155,7 @@ All notable changes to springcm-sdk will be documented in this file.
152
155
  ### Added
153
156
  * Initial release to reserve gem name
154
157
 
155
- [Unreleased]: https://github.com/paulholden2/springcm-sdk/compare/1.2.0...HEAD
158
+ [Unreleased]: https://github.com/paulholden2/springcm-sdk/compare/1.3.0...HEAD
156
159
  [0.1.0]: https://github.com/paulholden2/springcm-sdk/releases/tag/0.1.0
157
160
  [0.1.1]: https://github.com/paulholden2/springcm-sdk/releases/tag/0.1.1
158
161
  [0.1.2]: https://github.com/paulholden2/springcm-sdk/releases/tag/0.1.2
@@ -172,3 +175,4 @@ All notable changes to springcm-sdk will be documented in this file.
172
175
  [1.0.1]: https://github.com/paulholden2/springcm-sdk/releases/tag/1.0.1
173
176
  [1.1.0]: https://github.com/paulholden2/springcm-sdk/releases/tag/1.1.0
174
177
  [1.2.0]: https://github.com/paulholden2/springcm-sdk/releases/tag/1.2.0
178
+ [1.3.0]: https://github.com/paulholden2/springcm-sdk/releases/tag/1.3.0
@@ -138,6 +138,24 @@ module Springcm
138
138
  end
139
139
  end
140
140
 
141
+ def create_folder(name:)
142
+ conn = @client.authorized_connection(url: @client.object_api_url)
143
+ res = conn.post do |req|
144
+ req.headers["Content-Type"] = "application/json"
145
+ req.url "folders"
146
+ req.body = {
147
+ "ParentFolder" => raw,
148
+ "Name" => name
149
+ }.to_json
150
+ end
151
+ if res.success?
152
+ data = JSON.parse(res.body)
153
+ Folder.new(data, @client)
154
+ else
155
+ nil
156
+ end
157
+ end
158
+
141
159
  def copy(path: nil, uid: nil)
142
160
  parent = @client.folder(path: path, uid: uid)
143
161
  body = {
@@ -1,3 +1,3 @@
1
1
  module Springcm
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: springcm-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Holden
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-20 00:00:00.000000000 Z
11
+ date: 2020-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -193,7 +193,7 @@ metadata:
193
193
  allowed_push_host: https://rubygems.org
194
194
  homepage_uri: https://github.com/paulholden2/springcm-sdk
195
195
  source_code_uri: https://github.com/paulholden2/springcm-sdk
196
- documentation_uri: https://rubydoc.info/github/paulholden2/springcm-sdk/1.2.0
196
+ documentation_uri: https://rubydoc.info/github/paulholden2/springcm-sdk/1.3.0
197
197
  changelog_uri: https://github.com/paulholden2/springcm-sdk/blob/master/CHANGELOG.md
198
198
  post_install_message:
199
199
  rdoc_options: []