bzapper 0.10.0 → 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84d17cde4c28892c1f57d54e891bf6bf1d9b68e711046f8276515f775922d8da
4
- data.tar.gz: d44bcc3fdda4b5e4e66d02972b0e8b7b0434a61e92d0cf059ef0f6149be1caf4
3
+ metadata.gz: 11d1f4c09306edd0ebee64aae4a21ce94abd01f6b1c970c8d20560312c00ba82
4
+ data.tar.gz: b7282a59b60b37c64ae70389d2a4e33bedf5dc968434b82ea355e37b0ed1823c
5
5
  SHA512:
6
- metadata.gz: b8104c3e9059859bba1ca20c5b5a8281b47b3939c23358139549e8cb503bd2b8b0a921dd0d94bda75b85a3c8524d336d29545c6fe330b81ae0cec3c84c95750b
7
- data.tar.gz: d712bbd689f1f8cf9559162ddbe6a4c2720398f79b88dfbf3ec0c22a40ee383411165e6307092d4a7af0375a3d456be5ae9aa8019ca26f774ce23816ea24b103
6
+ metadata.gz: e68a0d83d6ec6ad449386fb2d86f821ac073b3726ae39e111aa8ef6b38ce9b671e0f1f352738673fdb70fb48f8a89dd5c672d5cfa85405c6f5a72d7d1a28ee0f
7
+ data.tar.gz: 71ea59c63593644c87876d6582ad452b3604ce5d67ad92cb7e0b17bd2d1f6e6cbe3c5195b918fcb8c7a37fd2a73051709cbb9ac32a2c40b2d0abdcd19b7b6618
data/README.md CHANGED
@@ -10,13 +10,13 @@ Zero dependências de runtime (só biblioteca padrão: `net/http`, `json`, `open
10
10
  ## Instalação
11
11
 
12
12
  ```bash
13
- gem install bzapper -v 0.10.0
13
+ gem install bzapper -v 0.11.0
14
14
  ```
15
15
 
16
16
  Ou no `Gemfile` — **fixe a versão exata** (cada release declara se muda a superfície pública):
17
17
 
18
18
  ```ruby
19
- gem "bzapper", "0.10.0"
19
+ gem "bzapper", "0.11.0"
20
20
  ```
21
21
 
22
22
  ## Hello world
@@ -965,7 +965,8 @@ module Bzapper
965
965
  # @param header_variables [Array<String>, nil] (corpo) Text header: the value of its variable.
966
966
  # Image, video or document header: the media URL for THIS send in the first position — omitted,
967
967
  # the sample media registered when the template was created goes out (Meta requires the media on
968
- # every send).
968
+ # every send). Location header: `[latitude, longitude, place name, address]` (the last two
969
+ # optional).
969
970
  # @param button_variables [Array<String>, nil] (corpo) Values for dynamic URL buttons, by button
970
971
  # index. Empty entries are skipped.
971
972
  # @param code [String, nil] (corpo) AUTHENTICATION templates only. Meta requires the code both
@@ -201,6 +201,22 @@ module Bzapper
201
201
  timeout: timeout)
202
202
  end
203
203
 
204
+ # Performance of each template (sent, delivered, read, failed). `GET /templates/analytics`
205
+ #
206
+ # Counted from the messages sent through each template in the last `days` days, grouped by
207
+ # template name.
208
+ #
209
+ # @param days [Integer, nil] (query)
210
+ # @param timeout [Numeric, nil] segundos por tentativa (padrão: o do cliente).
211
+ # @return [Hash, Array, nil] o JSON da resposta, inteiro (nil em 204).
212
+ # @raise [Bzapper::Error] resposta fora de 2xx ou falha de rede.
213
+ def get_template_analytics(days: nil, timeout: nil)
214
+ query = {
215
+ "days" => days
216
+ }
217
+ request("GET", "/templates/analytics", query: query, timeout: timeout)
218
+ end
219
+
204
220
  # Import templates that exist at Meta and not here. `POST /templates/sync`
205
221
  #
206
222
  # For the account that already used the Cloud API before bZapper and created templates in
@@ -3,5 +3,5 @@
3
3
  module Bzapper
4
4
  # Versão da gem. O `scripts/release-sdks.sh` do monorepo bumpa a linha abaixo por regex
5
5
  # (ancorada no início da linha) e o `bzapper.gemspec` lê daqui — não mude o formato dela.
6
- VERSION = "0.10.0"
6
+ VERSION = "0.11.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bzapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Berni Software