xmpush 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/xmpush/version.rb +1 -1
- data/lib/xmpush.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93b3c64d2e444279c978631951b85d4ca50774a9
|
4
|
+
data.tar.gz: f4e3c0c01b6c2a1d93799594f3d55397fee3da11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36cfecf2bc363ee64f26197bd0bd73a8057c8e95b8a0243680092345bf2faa253ea88b82afdfba892abe8eda35f11e8637b226cf6f1dd4b74181db2b051a5f65
|
7
|
+
data.tar.gz: 0c7efcb2becd559c3d37d54adb30166f910d433c1936b6e83ceb9b7065a6218d29b34a9b2ccc25413e036c6c9cb2fd4678f075456eb1e66fc4cbc50371447b4f
|
data/README.md
CHANGED
@@ -34,6 +34,13 @@ end
|
|
34
34
|
@message2 = @xm_service.build(:ios, description: 'hello alias', extra: {pid: 111})
|
35
35
|
@xm_service.push(:alias, @message2, alias: '1043478')
|
36
36
|
|
37
|
+
@message3 = @xm_service.build(:ios, description: 'hello topic', extra: {pid: 111})
|
38
|
+
@xm_service.push(:topic, @message2, topic: 'all')
|
39
|
+
|
40
|
+
#multi_topic
|
41
|
+
@message3 = @xm_service.build(:ios, description: 'hello topic', extra: {pid: 111})
|
42
|
+
@xm_service.push(:topics, @message2, topics: ['all', "other"])
|
43
|
+
|
37
44
|
# iOS and Android
|
38
45
|
@message3 = @xm_service.build(:both, title: "I'm title", description: 'push to iOS and Android client')
|
39
46
|
@xm_service.push(:all, @message3)
|
data/lib/xmpush/version.rb
CHANGED
data/lib/xmpush.rb
CHANGED
@@ -54,6 +54,10 @@ module Xmpush
|
|
54
54
|
return "must input topic" unless options[:topic]
|
55
55
|
message.values.each{|v| v.merge!(topic: options[:topic])}
|
56
56
|
resource_post('topic', message)
|
57
|
+
when :topics
|
58
|
+
return "must input topics" unless options[:topics]
|
59
|
+
message.values.each{|v| v.merge!(topics: options[:topics].join(";$;"))}
|
60
|
+
resource_post('mtopic', message)
|
57
61
|
when :all
|
58
62
|
resource_post('all', message)
|
59
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xmpush
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- blackanger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|