sg 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 +4 -4
- data/lib/sg/version.rb +1 -1
- data/lib/sg.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec2b677360953e28edaed315f7c132cf094ccc4c
|
4
|
+
data.tar.gz: b3102d281a5d4446f483356a6d1f9731f4d57fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d09e70c8a3fc014f9bff54225a024a22109fd69c86601c9a0d29880b98f9297b3f17d552957373d03da6b4bc4ba0920a4c184b6fed9a284624bf0a500191844
|
7
|
+
data.tar.gz: 456c07a21fad3693a8fd584061e8154ed6c6a91457e90e5f933b6dc6d9f5c9f37b3b1476715efb42c54e37cb4548ee19affbf8b6ec99ac87f4ba37e561923a83
|
data/lib/sg/version.rb
CHANGED
data/lib/sg.rb
CHANGED
@@ -27,13 +27,16 @@ module Sg
|
|
27
27
|
3. With query string
|
28
28
|
\x5Use -q option for the query string with the JSON string value.
|
29
29
|
\x5GET https://api.sendgrid.com/v3/suppression/bounces?start_time=14324566&end_time=14324566
|
30
|
-
\x5> $ bundle exec sg client suppression
|
30
|
+
\x5> $ bundle exec sg client suppression unsubscribes get -q='{"start_time":1367794504,"end_time":1467794504}'
|
31
31
|
|
32
32
|
4. With request body
|
33
33
|
\x5Use -b option for the request body with the JSON string value.
|
34
34
|
\x5POST https://api.sendgrid.com/v3/api_keys
|
35
35
|
\x5{"name": "My API Key", "scopes": ["mail.send"]}
|
36
36
|
\x5> $ bundle exec sg client api_keys post -b='{"name": "My API Key", "scopes": ["mail.send"]}'
|
37
|
+
|
38
|
+
5. Send mail
|
39
|
+
\x5> $ sg client mail send post -b='{"personalizations":[{"to":[{"email":"to@example.com"}],"subject":"Hello, World!"}],"from":{"email":"from@example.com"},"content":[{"type":"text","value":"Hello, World!"}]}'
|
37
40
|
DESC
|
38
41
|
option(
|
39
42
|
:apikey,
|