google-api-fcm 0.1.5 → 0.1.6
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff91dab0d94d58d766a0ba5d18174bcf411d7d78fcde179663c91f165cff18d9
|
4
|
+
data.tar.gz: c3a88b2b4effe8b3e461c9e696bc9a7a2d934a04e8ae7ec32e6c97a160f28d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44d9d6c1946eb14d21f84145d9e425eafbfbb090a434fb2e4aea761de46aa60d3398d0be07add16c0af93e8b50bc4c4217a2b7ff8fb0a69a2e9906b59a69123c
|
7
|
+
data.tar.gz: 067a3ee396868e0996e6589e5029f6f3eb6abb0d6ce544aa1497243f4cac4dba4041134917cd4f8bc42342a2c838b85fe076330deb6ffdd3adf3911b5a415fcf
|
@@ -11,6 +11,10 @@ module Google
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def initialize_build(**args)
|
14
|
+
if args[:token] && args[:topic]
|
15
|
+
raise ArgumentError, "Arguments :token and :topic can't be used together"
|
16
|
+
end
|
17
|
+
|
14
18
|
if args[:notification]
|
15
19
|
notification = Notification.new(
|
16
20
|
title: args[:notification][:title],
|
@@ -20,6 +24,7 @@ module Google
|
|
20
24
|
|
21
25
|
message_object_args = {
|
22
26
|
topic: args[:topic],
|
27
|
+
token: args[:token],
|
23
28
|
data: args[:payload]
|
24
29
|
}
|
25
30
|
|
@@ -59,6 +64,7 @@ module Google
|
|
59
64
|
include Google::Apis::Core::Hashable
|
60
65
|
|
61
66
|
attr_accessor :topic
|
67
|
+
attr_accessor :token
|
62
68
|
attr_accessor :notification
|
63
69
|
attr_accessor :data
|
64
70
|
attr_accessor :android
|
@@ -72,6 +78,7 @@ module Google
|
|
72
78
|
# Update properties of this object
|
73
79
|
def update!(**args)
|
74
80
|
@topic = args[:topic] if args.key?(:topic)
|
81
|
+
@token = args[:token] if args.key?(:token)
|
75
82
|
@notification = args[:notification] if args.key?(:notification)
|
76
83
|
if args.key?(:data) && args[:data].is_a?(Hash)
|
77
84
|
@data = { 'payload' => JSON.dump(args[:data]) }
|
@@ -34,6 +34,7 @@ module Google
|
|
34
34
|
# @private
|
35
35
|
class Representation < Google::Apis::Core::JsonRepresentation
|
36
36
|
property :topic, as: 'topic'
|
37
|
+
property :token, as: 'token'
|
37
38
|
property :data, as: 'data'
|
38
39
|
property :notification, as: 'notification',
|
39
40
|
class: Google::Apis::Messages::Notification,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-api-fcm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Krigouzov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|