snm-fcm 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/snm/fcm/version.rb +1 -1
- data/lib/snm/fcm.rb +2 -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: 81af0e9bd57bcad8b56c96ecafb3be4fc9f3c3dfb8a30ddb1cf318ad9577f4cf
|
4
|
+
data.tar.gz: ad5fb2e8612b6d0088bdd3d0e9da43f7ab6e3b66801c7e11a2e60b9cc23a5754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd76e568dd01383e8dc189ce760c27b15ccf461f85962739f6054c57ded3d2aed13e71a73282ab4be27c2a22ab35da4c2ee74ed314140c90daa534217eae53bb
|
7
|
+
data.tar.gz: f4dd951259f3c6cd98f711a01dbc165845cba4aa86cb47ec694a41a7e0517c4f55ca2de950f596a762523c67e55d87a92fcee116ecc1959cb2b558fc92354b48
|
data/lib/snm/fcm/version.rb
CHANGED
data/lib/snm/fcm.rb
CHANGED
@@ -25,7 +25,8 @@ module Snm
|
|
25
25
|
def self.deliver data={}
|
26
26
|
raise 'Data is missing' if data.nil?
|
27
27
|
|
28
|
-
HTTP.headers("Content-Type"=> "application/json", "Authorization"=> "Bearer #{get_access_token}").post("https://fcm.googleapis.com/v1/projects/#{Notification.configuration.project_id}/messages:send", json: data)
|
28
|
+
response = HTTP.headers("Content-Type"=> "application/json", "Authorization"=> "Bearer #{get_access_token}").post("https://fcm.googleapis.com/v1/projects/#{Notification.configuration.project_id}/messages:send", json: data)
|
29
|
+
JSON.parse(response.body)
|
29
30
|
end
|
30
31
|
|
31
32
|
def self.get_access_token
|