bannerbear 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2da12377f479bda2685084b6de8bbaedd54b043f565e2b8d646ff9d36c1ec93
4
- data.tar.gz: 477db9f95c4df6f068667816546d813e4021288301103a207c61e6227aa199d6
3
+ metadata.gz: a63e7f3269afc788dea97a56ba271553cce7ae8ad8c605246321be788bbe5601
4
+ data.tar.gz: 68aa7455b8b4b71ddcf47ee0a59563d0a36f437670822680b9030ff0d41993a2
5
5
  SHA512:
6
- metadata.gz: 619e0c3e44fd9be99a86d0874418d6f4d6db14bf94c6200f3decb78a83f0fd7cb8e02ced1f86bd3d562a53d617e7e98f99165ce4372d5a49bafdaf4f55b411d8
7
- data.tar.gz: 64d0ed8cec035ce84a9976915515ab63106e0e9ed8e890b37887b57e41cc68401877e877a228e0cae7e6c594da4319cd5fc72a44c0390046cbab37a162ddd8e3
6
+ metadata.gz: 2e4cc99311a703073a184a5211bf1c7c14b18df1062b03592558368e4d017d3f5e116f1c7948c63703300bb4af6cc6da5c0b15bdaf5942e4a1465624fc89c0af
7
+ data.tar.gz: a3017ce751ebfac3260bd7f174b61040ac2c0130a28f13ced336f7d77e0944507a195ef28aba8701d706fc4b6bef8d5b428a7ee3e51bfa716ef92fddf33af26a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bannerbear (0.1.2)
4
+ bannerbear (0.1.4)
5
5
  httparty
6
6
 
7
7
  GEM
@@ -12,7 +12,7 @@ GEM
12
12
  multi_xml (>= 0.5.2)
13
13
  mime-types (3.4.1)
14
14
  mime-types-data (~> 3.2015)
15
- mime-types-data (3.2021.1115)
15
+ mime-types-data (3.2022.0105)
16
16
  multi_xml (0.6.0)
17
17
  rake (12.3.3)
18
18
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Bannerbear
1
+ # Bannerbear Ruby
2
2
 
3
3
  Ruby wrapper for the [Bannerbear API](https://developers.bannerbear.com) - an image and video generation service.
4
4
 
@@ -33,6 +33,7 @@ Or install it yourself as:
33
33
  - [Templates](#templates)
34
34
  - [Template Sets](#template-sets)
35
35
  - [Video Templates](#video-templates)
36
+ - [Signed URLs](#signed-urls)
36
37
 
37
38
  ### Authentication
38
39
 
@@ -333,6 +334,29 @@ bb.get_video_template("video template uid")
333
334
  bb.list_video_templates(:page => 2)
334
335
  ```
335
336
 
337
+ ### Signed URLs
338
+
339
+ This gem also includes a convenient utility for generating signed urls. Authenticate as above, then:
340
+
341
+ ```ruby
342
+ bb.generate_signed_url("base uid", :modifications => [])
343
+
344
+ # example
345
+ bb.generate_signed_url("A89wavQyY3Bebk3djP",
346
+ :modifications => [
347
+ {
348
+ :name => "country",
349
+ :text => "testing!"
350
+ },
351
+ {
352
+ :name => "photo",
353
+ :image_url => "https://images.unsplash.com/photo-1638356435991-4c79b00ebef3?w=764&q=80"
354
+ }
355
+ ]
356
+ )
357
+ # https://ondemand.bannerbear.com/signedurl/A89wavQyY3Bebk3djP/image.jpg?modifications=W3sibmFtZSI6ImNvdW50cnkiLCJ0ZXh0IjoidGVzdGluZyEifSx7Im5hbWUiOiJwaG90byIsImltYWdlX3VybCI6Imh0dHBzOi8vaW1hZ2VzLnVuc3BsYXNoLmNvbS9waG90by0xNjM4MzU2NDM1OTkxLTRjNzliMDBlYmVmMz93PTc2NCZxPTgwIn1d&s=40e7c9d4902b86ea83e0c400e57d7cc580534fd527e234d40a0c7ace589a16eb
358
+ ```
359
+
336
360
  ## Contributing
337
361
 
338
362
  Bug reports and pull requests are welcome on GitHub at https://github.com/yongfook/bannerbear-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yongfook/bannerbear-ruby/blob/master/CODE_OF_CONDUCT.md).
@@ -109,8 +109,8 @@ module Bannerbear
109
109
 
110
110
  # Templates
111
111
 
112
- def get_template(uid)
113
- get_response "/templates/#{uid}"
112
+ def get_template(uid, params = {})
113
+ get_response "/templates/#{uid}?#{URI.encode_www_form(params.slice(:extended))}"
114
114
  end
115
115
 
116
116
  def update_template(uid, payload = {})
@@ -118,17 +118,17 @@ module Bannerbear
118
118
  end
119
119
 
120
120
  def list_templates(params = {})
121
- get_response "/templates?#{URI.encode_www_form(params.slice(:page, :tag, :limit, :name))}"
121
+ get_response "/templates?#{URI.encode_www_form(params.slice(:page, :tag, :limit, :name, :extended))}"
122
122
  end
123
123
 
124
124
  # Template Sets
125
125
 
126
- def get_template_set(uid)
127
- get_response "/template_sets/#{uid}"
126
+ def get_template_set(uid, params = {})
127
+ get_response "/template_sets/#{uid}?#{URI.encode_www_form(params.slice(:extended))}"
128
128
  end
129
129
 
130
130
  def list_template_sets(params = {})
131
- get_response "/template_sets?#{URI.encode_www_form(params.slice(:page))}"
131
+ get_response "/template_sets?#{URI.encode_www_form(params.slice(:page, :extended))}"
132
132
  end
133
133
 
134
134
  # Video Templates
@@ -1,3 +1,3 @@
1
1
  module Bannerbear
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bannerbear
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Yongfook
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2022-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty