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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d84858414150e1f38a1feb48aaa131fc59d282b26669830adadbec5fc89493e9
4
- data.tar.gz: 957bdb675a7540a9a38fc036186edf73e6c1ce0885e7c712c490adf35c783c2e
3
+ metadata.gz: 81af0e9bd57bcad8b56c96ecafb3be4fc9f3c3dfb8a30ddb1cf318ad9577f4cf
4
+ data.tar.gz: ad5fb2e8612b6d0088bdd3d0e9da43f7ab6e3b66801c7e11a2e60b9cc23a5754
5
5
  SHA512:
6
- metadata.gz: a8facdd1a526d7da68a514bf912ef2cf908c9b53cc58a8bfe6fa2d00c77adf780562ff4541fc1b6ede76904a00c66a302fb583125c9b7f2809c0aab5714ebaae
7
- data.tar.gz: a8685c4b424486b78aa754c19bf57089cbac98650f4791ddde635060e1c81228ec635f387fa52db93f8029f85991bfea718efd9cd520024ad75c103ce3262318
6
+ metadata.gz: cd76e568dd01383e8dc189ce760c27b15ccf461f85962739f6054c57ded3d2aed13e71a73282ab4be27c2a22ab35da4c2ee74ed314140c90daa534217eae53bb
7
+ data.tar.gz: f4dd951259f3c6cd98f711a01dbc165845cba4aa86cb47ec694a41a7e0517c4f55ca2de950f596a762523c67e55d87a92fcee116ecc1959cb2b558fc92354b48
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Snm
4
4
  module Fcm
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snm-fcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - snmmaurya