skipio_api 0.0.4 → 0.0.7
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/skipio.rb +5 -5
- 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: 3c3305ce4a0402dce9c16e33688669ff3eab59bf
|
4
|
+
data.tar.gz: 304b6793e86940c2578a3dac43c266e478d47d87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7801f6e979cfdecf258dbfab59adfcf86370884134b7fdcbc9912178c0f012cd5d303393946b48e5a60124a976bedf7f7c8c19f20e053a58e6c816e7a77f7227
|
7
|
+
data.tar.gz: 600466c01cedb3460b1bddedd8403dca362cc9e8599628d937efc77ed183c46d0bb63036af580b2d165a1b4d9f56ac3684b8657c1aaf3f456ad1d9d099e2073d
|
data/lib/skipio.rb
CHANGED
@@ -29,9 +29,9 @@ class Skipio
|
|
29
29
|
# params = { recipients: 'Comma Separated User UUID', message: 'body message' }
|
30
30
|
def send_message(params = {})
|
31
31
|
url = 'v2/messages'
|
32
|
-
json_data = build_json_message_data
|
32
|
+
json_data = build_json_message_data(params)
|
33
33
|
options = { json: json_data }
|
34
|
-
response = process_by_url(url,
|
34
|
+
response = process_by_url(url, :post, options)
|
35
35
|
JSON.parse(response.body)
|
36
36
|
end
|
37
37
|
|
@@ -66,13 +66,13 @@ class Skipio
|
|
66
66
|
http.request(request)
|
67
67
|
end
|
68
68
|
|
69
|
-
def build_json_message_data
|
69
|
+
def build_json_message_data(params)
|
70
70
|
{
|
71
71
|
"recipients": [
|
72
|
-
|
72
|
+
params[:recipients]
|
73
73
|
],
|
74
74
|
"message": {
|
75
|
-
"body":
|
75
|
+
"body": params[:message]
|
76
76
|
}
|
77
77
|
}
|
78
78
|
end
|