esa 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +7 -1
- data/lib/esa/api_methods.rb +5 -0
- data/lib/esa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93e305f596857d93c6f6489344371fa9369488b819ab4071804cdb0e576c8c11
|
4
|
+
data.tar.gz: 6d3fd439655db92eaa698a77d4a23dad260b2e8f451fe0f35a6b89877419d251
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 743652d2bd4dc1de8c4d0d7cec158bbeb4277cba7c523f476b2ed0371475add00e3f2f3e336cb9f43e502b40a7c7174677f0b40044af979df2bb6d58d6eca1e2
|
7
|
+
data.tar.gz: f38b5e9d9e1f471f16d4009412c25d64830620f40303bbe533889a90526367e965b7b7c013de67b6c3008276982e1dafee208df6e59f28c77d4e7690ab5e038c
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
nothing
|
4
4
|
|
5
|
+
## 3.1.0 (2025-02-21)
|
6
|
+
- add: [Add signed_urls method](https://github.com/esaio/esa-ruby/pull/70)
|
7
|
+
|
5
8
|
## 3.0.0 (2025-02-20)
|
6
9
|
- :warning: breaking: [Drop Support for Ruby < 3.1](https://github.com/esaio/esa-ruby/pull/67)
|
7
10
|
- ci: [Tweak CI ruby versions](https://github.com/esaio/esa-ruby/pull/65)
|
data/README.md
CHANGED
@@ -192,9 +192,15 @@ client.upload_attachment('http://example.com/foo.png') # Remote
|
|
192
192
|
client.upload_attachment(['http://example.com/foo.png', cookie_str]) # Remote URL + Cookie
|
193
193
|
client.upload_attachment(['http://example.com/foo.png', headers_hash]) # Remote URL + Headers
|
194
194
|
|
195
|
-
# Signed url for secure upload(beta)
|
195
|
+
# Signed url for secure upload(beta): deprecated
|
196
196
|
client.signed_url('uploads/p/attachments/1/2016/08/16/1/foobar.png')
|
197
197
|
#=> GET /v1/teams/foobar/signed_url/uploads/p/attachments/1/2016/08/16/1/foobar.png
|
198
|
+
|
199
|
+
# Signed urls for secure upload(beta): upto 1,000 urls at once
|
200
|
+
client.signed_urls(['https://files.esa.io/.../1', 'https://files.esa.io/.../2']) # expires_in defaults to 60 seconds and can be set from 1 to 604800
|
201
|
+
client.signed_urls(['https://files.esa.io/.../1', 'https://files.esa.io/.../2'], expires_in: 3600) # expires_in: 1 hour
|
202
|
+
#=> POST /v1/teams/foobar/signed_urls
|
203
|
+
#=> { signed_urls: [['https://files.esa.io/.../1', 'https://singed_url1'], ['https://files.esa.io/.../2', 'https://singed_url2']] }
|
198
204
|
```
|
199
205
|
|
200
206
|
|
data/lib/esa/api_methods.rb
CHANGED
@@ -202,6 +202,11 @@ module Esa
|
|
202
202
|
send_get("/v1/teams/#{current_team!}/signed_url/#{file_path}", params, headers)
|
203
203
|
end
|
204
204
|
|
205
|
+
def signed_urls(file_urls, params = {}, headers = nil)
|
206
|
+
params = params.merge(urls: file_urls)
|
207
|
+
send_post("/v1/teams/#{current_team!}/signed_urls", params, headers)
|
208
|
+
end
|
209
|
+
|
205
210
|
private
|
206
211
|
|
207
212
|
def wrap(params, envelope)
|
data/lib/esa/version.rb
CHANGED