notify_fcm 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/notify_fcm.rb +5 -4
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 885382826b2ac52f658988a86f5aef9d17933e8e
4
- data.tar.gz: 511b3807c550f4783426ba2242f40fb2826e8052
3
+ metadata.gz: 7b84d4a3fa90375e95c28dc7a3a036e6f4a9a6d7
4
+ data.tar.gz: 98801cea5928aa7dc2b3a9fb58cf0bdc56e49bd7
5
5
  SHA512:
6
- metadata.gz: 58171aa048377edf01f7976ffb987bb5be4376fd8d0d6b06f9e5901622e59fb1f98055d758e1e03de65a9e251bee3876079693881ad7701e85716ae020c2dddc
7
- data.tar.gz: ee9250641f70932a247db26ad722a8cf647b39c7b3e4f16f1bf9503a077836fddaf5ca691b8b2ba0a9ef036130639ba3071a8a593792f683b9efe9fb0ede08aa
6
+ metadata.gz: cb2ffc261c8dc0656038e4dba7f617bbb5a53d110a94c6f419e1ec8ea859ee741a1897bb9e19a4060d0a60b216023ed9874a47c2994bf862f2a8831fc564174c
7
+ data.tar.gz: bd0a60c21aa016281297cec855404ad3eb8fe9f777b1dec578fc1d37620cdb4283049a1f9b8e46a3def2a2cc0b127c372b72e3a4fc06dfe267f5a228b628cc94
data/lib/notify_fcm.rb CHANGED
@@ -5,10 +5,11 @@ require 'cgi'
5
5
 
6
6
  class NOTIFY_FCM
7
7
  include HTTParty
8
- attr_accessor :body, :title
9
- base_uri 'https://android.googleapis.com/gcm'
8
+ attr_accessor :body, :title, :icon, :sound, :vibrate, :color, :priority
9
+ base_uri 'https://fcm.googleapis.com/fcm'
10
+
10
11
  # constants
11
- NOTIFICATION_BASE_URI = 'https://android.googleapis.com/gcm'
12
+ # NOTIFICATION_BASE_URI = 'https://android.googleapis.com/gcm'
12
13
 
13
14
  def initialize(api_key, options = {})
14
15
  @api_key = api_key
@@ -42,7 +43,7 @@ class NOTIFY_FCM
42
43
  end
43
44
 
44
45
  def message_body()
45
- {notification: { body: body, title: title}}
46
+ {notification: { body: body, title: title, icon: icon, sound: sound, vibrate: true, color: color, priority: priority}}
46
47
  end
47
48
 
48
49
  def response_builder(response)
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notify_fcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vipin Kumar
8
+ - Sachin Singh
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []