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 +4 -4
- data/README.md +2 -2
- data/lib/bzapper/resources/messages.rb +2 -1
- data/lib/bzapper/resources/templates.rb +16 -0
- data/lib/bzapper/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: 11d1f4c09306edd0ebee64aae4a21ce94abd01f6b1c970c8d20560312c00ba82
|
|
4
|
+
data.tar.gz: b7282a59b60b37c64ae70389d2a4e33bedf5dc968434b82ea355e37b0ed1823c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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
|
data/lib/bzapper/version.rb
CHANGED