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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db8c672e180cd6677a2d924c5c7bf2390768d7d9
4
- data.tar.gz: ded56f01305c94545bc3ff5cefdec06c98bd3a23
3
+ metadata.gz: 93b3c64d2e444279c978631951b85d4ca50774a9
4
+ data.tar.gz: f4e3c0c01b6c2a1d93799594f3d55397fee3da11
5
5
  SHA512:
6
- metadata.gz: 72b641199e4f4e369d83b3aef4b961358cc6a6088f618291bd633fe7880048d79bc8448955695adaa7dbfac680c1068e1943d33612cb603580fdb7d617e69737
7
- data.tar.gz: b725b9917583a1e16e758629f35fd23b55c450dedb7fdd7f3e1f0857af6561c5d990faca3d83980b07293dfa3b43042a62aa3eb35dc72234030b7cc9cba7d295
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)
@@ -1,3 +1,3 @@
1
1
  module Xmpush
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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.6
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: 2014-12-22 00:00:00.000000000 Z
11
+ date: 2015-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday