snm-fcm 0.1.3 → 0.1.5

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: 991a04d8b3f660e9f74fbdf29a31b7478e0ed39b04a2a510d1353550d6fb16b2
4
+ data.tar.gz: c370801fce9fd3413877015b9484a1cfbd1ece69eaeb2d852639dc188c87219b
5
5
  SHA512:
6
- metadata.gz: a8facdd1a526d7da68a514bf912ef2cf908c9b53cc58a8bfe6fa2d00c77adf780562ff4541fc1b6ede76904a00c66a302fb583125c9b7f2809c0aab5714ebaae
7
- data.tar.gz: a8685c4b424486b78aa754c19bf57089cbac98650f4791ddde635060e1c81228ec635f387fa52db93f8029f85991bfea718efd9cd520024ad75c103ce3262318
6
+ metadata.gz: 52832fe027409c109c83d99dc32eac6bddd0d95f14a8e0cac644026bd9b52a616f5dad840a845456a8d0aeda52e443c6239daaa119e106871870d6d4d2cf6282
7
+ data.tar.gz: e7d828acb36fe5b75b88428141714c1c1540a2746bdbb976aa5222d2e2ddcfd43c337dc9aaad133b4ed678ace3c9aac867f3e48fab5a46d958dd072032a38368
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Snm
4
4
  module Fcm
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.5"
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.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - snmmaurya
@@ -58,7 +58,8 @@ dependencies:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: 2.7.2
61
- description: ''
61
+ description: Ruby Library to send notification on android via Firebase Cloud Messaging
62
+ API (V1)
62
63
  email:
63
64
  - snmspace@gmail.com
64
65
  executables: []
@@ -101,5 +102,6 @@ requirements: []
101
102
  rubygems_version: 3.3.7
102
103
  signing_key:
103
104
  specification_version: 4
104
- summary: FCM V1 send notification
105
+ summary: Ruby Library to send notification on android via Firebase Cloud Messaging
106
+ API (V1)
105
107
  test_files: []