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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7899d7060029ab35da43d2b9446dda015a783a10dd5265974ef6ecd1638dd97
4
- data.tar.gz: 2aad1556b9718825a322fbb00408086826651b3ee740ba56233ef612c51bd10c
3
+ metadata.gz: 93e305f596857d93c6f6489344371fa9369488b819ab4071804cdb0e576c8c11
4
+ data.tar.gz: 6d3fd439655db92eaa698a77d4a23dad260b2e8f451fe0f35a6b89877419d251
5
5
  SHA512:
6
- metadata.gz: b3b7d83c6b2600e0b709dfd3238d773ce033bc6a7f1b3bb72eec0bcf8154c4f48e5aabbc2bdb97d2e229d1ce6b4f6cb810639a70664e269791e90c95478162b8
7
- data.tar.gz: 25800be1607b379015764a4bb7964b0ac758dc55ed8bce927e16019da0c90091a961c22fee90f49b1f818f7ca03767299a84f6a89aee7ac18ea9f20ea678ea4c
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
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Esa
4
- VERSION = '3.0.0'
4
+ VERSION = '3.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esa
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu