localytics-ruby 0.0.2 → 0.0.3
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 +8 -8
- data/lib/localytics/push.rb +4 -4
- data/test/localytics_test.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzBjZDBiM2MwMmVhMmRmYjIyMzg0ZDNhM2M1OThjNTNmNzY2ZDRhZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjRmYmJiNWU2ZmNlYzI1NDE5ZWJkMDM3MzljZjViYmJmODkxNzFjYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDU3N2JiMTQ2M2Q0NDMwYTJmZTlkN2QyMmZmYjAwYzY0ZDkyZTU0MWNkZWEy
|
10
|
+
OTAwYzBlMmQzMmM4ZjU5ZmI3NGNiN2MwMDkwMTAzZDJiMmE1NTVlY2NlNWYw
|
11
|
+
YjY4YmVjYzU5MjNiMjI4YzQzYzlhZDAzNDQ4NzVhMmFiNDE0ODM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzhlYWE3Mzc0Zjc5MTQ5ZTM1ODRlYzI1YzQ5ZTEzYjQwNDk5NTc2OTE0MmJk
|
14
|
+
Yzg4YzVkNWEzZDExMzkyYzE0M2MzMmU3NjcwYjc5OTdhZDM3OTVjYTA0MTUx
|
15
|
+
ZWI2Yjk0YThhMjQzNzVkYzExYjQ4NWY0Y2EwM2JiYTE4Yjg2OWQ=
|
data/lib/localytics/push.rb
CHANGED
@@ -41,21 +41,21 @@ module Localytics
|
|
41
41
|
|
42
42
|
# For :messages options please check the :push method
|
43
43
|
def self.push_to_customers(messages, app_id, campaing_key = nil, api_key=nil, api_secret=nil)
|
44
|
-
push messages, 'customer_id',
|
44
|
+
push messages, 'customer_id', app_id, campaing_key, api_key, api_secret
|
45
45
|
end
|
46
46
|
|
47
47
|
# For :messages options please check the :push method
|
48
48
|
def self.push_to_all_customers(messages, app_id, campaing_key = nil, api_key=nil, api_secret=nil)
|
49
|
-
push messages, 'broadcast',
|
49
|
+
push messages, 'broadcast', app_id, campaing_key, api_key, api_secret
|
50
50
|
end
|
51
51
|
|
52
52
|
# For :messages options please check the :push method
|
53
53
|
def self.push_to_profiles(messages, app_id, campaing_key = nil, api_key=nil, api_secret=nil)
|
54
|
-
push messages, 'profile',
|
54
|
+
push messages, 'profile', app_id, campaing_key, api_key, api_secret
|
55
55
|
end
|
56
56
|
|
57
57
|
def self.push_to_audiences(messages, app_id, campaing_key = nil, api_key=nil, api_secret=nil)
|
58
|
-
push messages, 'audience_id',
|
58
|
+
push messages, 'audience_id', app_id, campaing_key, api_key, api_secret
|
59
59
|
end
|
60
60
|
|
61
61
|
private
|
data/test/localytics_test.rb
CHANGED
@@ -68,6 +68,6 @@ end
|
|
68
68
|
|
69
69
|
test 'send push' do |mock|
|
70
70
|
mock.expects(:post).once.with('https://messaging.localytics.com/v2/push/app_id', anything).returns(test_response({}, 200))
|
71
|
-
Localytics::Push.push_to_customers [{alert: 'message', target: 1}], '
|
71
|
+
Localytics::Push.push_to_customers [{alert: 'message', target: 1}], 'app_id'
|
72
72
|
end
|
73
73
|
|