leanplum_api 3.0.3 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -2
- data/lib/leanplum_api/api.rb +18 -5
- data/lib/leanplum_api/faraday_middleware/response_validation.rb +2 -2
- data/lib/leanplum_api/version.rb +1 -1
- data/spec/api_spec.rb +29 -12
- data/spec/fixtures/vcr/export_data.yml +9 -9
- data/spec/fixtures/vcr/export_data_dates.yml +8 -8
- data/spec/fixtures/vcr/export_user.yml +9 -9
- data/spec/fixtures/vcr/get_ab_test.yml +8 -8
- data/spec/fixtures/vcr/get_ab_tests.yml +8 -8
- data/spec/fixtures/vcr/get_export_results.yml +8 -8
- data/spec/fixtures/vcr/get_messages.yml +9 -9
- data/spec/fixtures/vcr/get_vars.yml +8 -8
- data/spec/fixtures/vcr/missing_message.yml +7 -7
- data/spec/fixtures/vcr/reset_anomalous_user.yml +8 -8
- data/spec/fixtures/vcr/set_user_attributes.yml +11 -12
- data/spec/fixtures/vcr/track_events.yml +12 -14
- data/spec/fixtures/vcr/track_events_and_attributes.yml +12 -15
- data/spec/fixtures/vcr/track_events_anomaly_overrider.yml +21 -22
- data/spec/fixtures/vcr/track_offline_events.yml +12 -14
- data/spec/spec_helper.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2908e4c232266ec051f099699765d0605a270e2b
|
4
|
+
data.tar.gz: 82b980405f5c55a3096e4101cb2c7b503796f18b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21525c8ab65ad7b2226b06bb3717df28b131aba26e114625b20aa32c6f5b4e828655f3d485b3d85f5f80d7dda6165d9f8926f533109cdf03e065cd38a0b67ae2
|
7
|
+
data.tar.gz: 07f5ebb8514bedcd977f74d173127b074fb2dae7efd36bcc0fc91181e8d2865647ca96dbb8e61cf32b3836fd94b259da2b0ee7e4e2447d523c91b8d593d331ec
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Leanplum also likes to change and break stuff in their API without changing the
|
|
10
10
|
|
11
11
|
The gem uses the ```multi``` method with a POST for all event tracking and user attribute updating requests. Check Leanplum's docs for more information on ```multi```.
|
12
12
|
|
13
|
-
Tested with Leanplum API version 1.0.6.
|
13
|
+
Tested with Leanplum API version 1.0.6 - which is actually totally meaningless because the version is always 1.0.6, even when they make major revisions to how the API works.
|
14
14
|
|
15
15
|
`required_ruby_version` is set to 1.9 but this code has only been tested with Ruby 2.1.5 and up!
|
16
16
|
|
@@ -66,6 +66,22 @@ attribute_hash = {
|
|
66
66
|
}
|
67
67
|
api.set_user_attributes(attribute_hash)
|
68
68
|
|
69
|
+
# In 2017, Leanplum implemented the ability to set various first and last timestamps for event occurrences, as well as
|
70
|
+
# counts for that event in their API at the same time as you set various attributes for that user.
|
71
|
+
# This is what it would look like to push data about an event that happened 5 times between 2015-02-01 and today.
|
72
|
+
attribute_hash = {
|
73
|
+
user_id: 12345,
|
74
|
+
events: {
|
75
|
+
my_event_name: {
|
76
|
+
count: 5,
|
77
|
+
value: 'woodgrain',
|
78
|
+
firstTime: '2015-02-01'.to_time,
|
79
|
+
lastTime: Time.now.utc
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
api.set_user_attributes(attribute_hash)
|
84
|
+
|
69
85
|
# You must also provide the :event property for event tracking.
|
70
86
|
## :info is an optional property for an extra string.
|
71
87
|
## You can optionally provide a :time; if it is not set Leanplum will timestamp the event "now".
|
@@ -78,7 +94,8 @@ event = {
|
|
78
94
|
some_event_property: 'boss_hog_on_candy'
|
79
95
|
}
|
80
96
|
api.track_events(event)
|
81
|
-
# Events tracked like
|
97
|
+
# Events tracked like that will be made part of a session; for independent events use :allow_offline
|
98
|
+
# Ed. note 2017-09-12 - looks like Leanplum changed their API and everything is considered offline now
|
82
99
|
api.track_events(event, allow_offline: true)
|
83
100
|
|
84
101
|
# You can also track events and user attributes at the same time
|
@@ -101,6 +118,16 @@ response = wait_for_export_job(job_id)
|
|
101
118
|
|
102
119
|
**Note well that Leanplum now officially recommends use of the automated S3 export instead of API based export.** According to a Leanplum engineer these two data export methodologies are completely independent data paths and in our experience we have found API based data export to be missing 10-15% of the data that is eventually returned by the automated export.
|
103
120
|
|
121
|
+
### Other Available Methods
|
122
|
+
* `api.user_attributes(user_id)`
|
123
|
+
* `api.user_events(user_id)`
|
124
|
+
* `api.get_ab_tests(only_recent)`
|
125
|
+
* `api.get_ab_test(ab_test_id)`
|
126
|
+
* `api.get_messages(only_recent)`
|
127
|
+
* `api.get_message(message_id)`
|
128
|
+
* `api.get_variant(variant_id)`
|
129
|
+
* `api.get_vars(user_id)`
|
130
|
+
|
104
131
|
## Specs
|
105
132
|
|
106
133
|
`bundle exec rspec` should work fine at running existing specs.
|
data/lib/leanplum_api/api.rb
CHANGED
@@ -22,8 +22,8 @@ module LeanplumApi
|
|
22
22
|
|
23
23
|
# This method is for tracking events and/or updating user attributes at the same time, batched together like
|
24
24
|
# leanplum recommends.
|
25
|
-
# Set
|
26
|
-
#
|
25
|
+
# Set force_anomalous_override: true to catch warnings from leanplum about anomalous events and force them to not
|
26
|
+
# be considered anomalous
|
27
27
|
def track_multi(events = nil, user_attributes = nil, options = {})
|
28
28
|
request_data = Array.wrap(user_attributes).map { |h| build_user_attributes_hash(h) } +
|
29
29
|
Array.wrap(events).map { |h| build_event_attributes_hash(h, options) }
|
@@ -60,6 +60,7 @@ module LeanplumApi
|
|
60
60
|
# leads to sort of unprocessed information that can be incomplete.
|
61
61
|
# They recommend using the automatic export to S3 if possible.
|
62
62
|
def export_data(start_time, end_time = nil)
|
63
|
+
LeanplumApi.configuration.logger.warn("You should probably use the direct S3 export instead of exportData")
|
63
64
|
fail "Start time #{start_time} after end time #{end_time}" if end_time && start_time > end_time
|
64
65
|
LeanplumApi.configuration.logger.info("Requesting data export from #{start_time} to #{end_time}...")
|
65
66
|
|
@@ -222,9 +223,17 @@ module LeanplumApi
|
|
222
223
|
# As of 2015-10 Leanplum supports ISO8601 date & time strings as user attributes.
|
223
224
|
def build_user_attributes_hash(user_hash, action = 'setUserAttributes')
|
224
225
|
user_hash = HashWithIndifferentAccess.new(user_hash)
|
225
|
-
user_hash.each { |k, v| user_hash[k] = v.iso8601 if
|
226
|
+
user_hash.each { |k, v| user_hash[k] = v.iso8601 if is_date_or_time?(v) }
|
226
227
|
|
227
|
-
|
228
|
+
if (events = user_hash.delete(:events))
|
229
|
+
events.each do |event_name, event_props|
|
230
|
+
event_props.each { |k, v| event_props[k] = v.strftime('%s').to_i if is_date_or_time?(v) }
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
user_attributes = extract_user_id_or_device_id_hash!(user_hash).merge(action: action, userAttributes: user_hash)
|
235
|
+
user_attributes[:events] = events if events
|
236
|
+
user_attributes
|
228
237
|
end
|
229
238
|
|
230
239
|
# Events have a :user_id or :device id, a name (:event) and an optional time (:time)
|
@@ -235,11 +244,15 @@ module LeanplumApi
|
|
235
244
|
fail ":event key not present in #{event_hash}" unless event_name
|
236
245
|
|
237
246
|
event = { action: 'track', event: event_name }.merge(extract_user_id_or_device_id_hash!(event_hash))
|
238
|
-
event.merge!(time: event_hash.delete(:time).strftime('%s')) if event_hash[:time]
|
247
|
+
event.merge!(time: event_hash.delete(:time).strftime('%s').to_i) if event_hash[:time]
|
239
248
|
event.merge!(info: event_hash.delete(:info)) if event_hash[:info]
|
240
249
|
event.merge!(allowOffline: true) if options[:allow_offline]
|
241
250
|
|
242
251
|
event_hash.keys.size > 0 ? event.merge(params: event_hash.symbolize_keys ) : event
|
243
252
|
end
|
253
|
+
|
254
|
+
def is_date_or_time?(obj)
|
255
|
+
obj.is_a?(Date) || obj.is_a?(Time) || obj.is_a?(DateTime)
|
256
|
+
end
|
244
257
|
end
|
245
258
|
end
|
@@ -28,13 +28,13 @@ module LeanplumApi
|
|
28
28
|
def validate_operation_success(operations, response)
|
29
29
|
success_indicators = response.body['response']
|
30
30
|
if success_indicators.size != operations.size
|
31
|
-
fail "Attempted to
|
31
|
+
fail "Attempted to do #{operations.size} operations but only received confirmation for #{success_indicators.size}!"
|
32
32
|
end
|
33
33
|
|
34
34
|
failures = []
|
35
35
|
success_indicators.each_with_index do |s, i|
|
36
36
|
if s['success'].to_s != 'true'
|
37
|
-
LeanplumApi.configuration.logger.error("Unsuccessful
|
37
|
+
LeanplumApi.configuration.logger.error("Unsuccessful request at position #{i}: #{operations[i]}")
|
38
38
|
failures << { operation: operations[i], error: s }
|
39
39
|
end
|
40
40
|
LeanplumApi.configuration.logger.warn("Warning for operation #{operations[i]}: #{s['warning']}") if s['warning']
|
data/lib/leanplum_api/version.rb
CHANGED
data/spec/api_spec.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe LeanplumApi::API do
|
4
|
-
let(:api) {
|
4
|
+
let(:api) { described_class.new }
|
5
5
|
let(:first_user_id) { 123456 }
|
6
|
+
let(:first_event_time) { Time.now.utc - 1.day }
|
7
|
+
let(:last_event_time) { Time.now.utc }
|
6
8
|
let(:users) do
|
7
9
|
[{
|
8
10
|
user_id: first_user_id,
|
@@ -11,7 +13,14 @@ describe LeanplumApi::API do
|
|
11
13
|
gender: 'm',
|
12
14
|
email: 'still_tippin@test.com',
|
13
15
|
create_date: '2010-01-01'.to_date,
|
14
|
-
is_tipping: true
|
16
|
+
is_tipping: true,
|
17
|
+
events: {
|
18
|
+
eventName1: {
|
19
|
+
count: 1,
|
20
|
+
firstTime: first_event_time,
|
21
|
+
lastTime: last_event_time
|
22
|
+
}
|
23
|
+
}
|
15
24
|
}]
|
16
25
|
end
|
17
26
|
|
@@ -20,6 +29,13 @@ describe LeanplumApi::API do
|
|
20
29
|
expect(api.send(:build_user_attributes_hash, users.first)).to eq({
|
21
30
|
userId: first_user_id,
|
22
31
|
action: 'setUserAttributes',
|
32
|
+
events: {
|
33
|
+
'eventName1' => {
|
34
|
+
'count' => 1,
|
35
|
+
'firstTime' => first_event_time.strftime('%s').to_i,
|
36
|
+
'lastTime' => last_event_time.strftime('%s').to_i
|
37
|
+
}
|
38
|
+
},
|
23
39
|
userAttributes: HashWithIndifferentAccess.new(
|
24
40
|
first_name: 'Mike',
|
25
41
|
last_name: 'Jones',
|
@@ -99,7 +115,7 @@ describe LeanplumApi::API do
|
|
99
115
|
let(:event_hash) do
|
100
116
|
{
|
101
117
|
userId: first_user_id,
|
102
|
-
time: Time.now.utc.strftime('%s'),
|
118
|
+
time: Time.now.utc.strftime('%s').to_i,
|
103
119
|
action: 'track',
|
104
120
|
event: purchase,
|
105
121
|
params: { some_timestamp: timestamp }
|
@@ -137,9 +153,11 @@ describe LeanplumApi::API do
|
|
137
153
|
end
|
138
154
|
|
139
155
|
context 'anomalous data force_anomalous_override' do
|
156
|
+
let(:old_events) { events.map { |e| e[:time] -= 1.year; e } }
|
157
|
+
|
140
158
|
it 'should successfully force the anomalous data override events' do
|
141
159
|
VCR.use_cassette('track_events_anomaly_overrider') do
|
142
|
-
expect { api.track_events(
|
160
|
+
expect { api.track_events(old_events, force_anomalous_override: true) }.to_not raise_error
|
143
161
|
end
|
144
162
|
end
|
145
163
|
end
|
@@ -156,7 +174,7 @@ describe LeanplumApi::API do
|
|
156
174
|
context 'user_events' do
|
157
175
|
it 'should get user events for this user' do
|
158
176
|
VCR.use_cassette('export_user') do
|
159
|
-
expect(api.user_events(first_user_id)[purchase].keys).to eq(
|
177
|
+
expect(api.user_events(first_user_id)[purchase].keys).to eq(%w(firstTime lastTime count))
|
160
178
|
end
|
161
179
|
end
|
162
180
|
end
|
@@ -198,8 +216,7 @@ describe LeanplumApi::API do
|
|
198
216
|
context 'get_export_results' do
|
199
217
|
it 'should get a status for a data export job' do
|
200
218
|
VCR.use_cassette('get_export_results') do
|
201
|
-
|
202
|
-
expect(response).to eq({
|
219
|
+
expect(api.get_export_results('export_4727756026281984_2904941266315269120')).to eq({
|
203
220
|
files: ['https://leanplum_export.storage.googleapis.com/export-4727756026281984-d5969d55-f242-48a6-85a3-165af08e2306-output-0'],
|
204
221
|
number_of_bytes: 36590,
|
205
222
|
number_of_sessions: 101,
|
@@ -230,11 +247,11 @@ describe LeanplumApi::API do
|
|
230
247
|
it 'gets messages' do
|
231
248
|
VCR.use_cassette('get_messages') do
|
232
249
|
expect(api.get_messages).to eq([{
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
250
|
+
'id' => 5670583287676928,
|
251
|
+
'created' => 1440091595.799,
|
252
|
+
'name' => 'New Message',
|
253
|
+
'active' => false,
|
254
|
+
'messageType' => 'Push Notification'
|
238
255
|
}])
|
239
256
|
end
|
240
257
|
end
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,25 +21,25 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- 482abfeaf55310728664574b5d8f8ffa
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgsIAxDWBiDjl-HNBQ; expires=Sun, 01-Nov-2020 17:04:35 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:35 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '96'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:35 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"error":{"message":"You cannot export
|
42
|
-
60 days"}
|
41
|
+
string: '{"response":[{"success":false,"error":{"message":"You cannot export
|
42
|
+
data older than 60 days"}}]}'
|
43
43
|
http_version:
|
44
|
-
recorded_at:
|
44
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
45
45
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,24 +21,24 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- 5f52126aafee5383ee9c42dcbc363208
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgsIAxDFBSDkl-HNBQ; expires=Sun, 01-Nov-2020 17:04:36 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:36 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '85'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:36 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"jobId":"
|
41
|
+
string: '{"response":[{"jobId":"export_4727756026281984_6485639014313861120","success":true}]}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
44
44
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,24 +21,24 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- 70e27b29a0e132e9b020b3c58861a123
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgoIAxBmIN-X4c0F; expires=Sun, 01-Nov-2020 17:04:31 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:31 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
|
-
- '
|
34
|
+
- '526'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:31 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"totalSessions":0,"
|
41
|
+
string: '{"response":[{"totalSessions":0,"timeSpentInApp":0.0,"userAttributes":{"is_tipping":"True","gender":"m","last_name":"Jones","create_date":"2010-01-01","first_name":"Mike","email":"still_tippin@test.com"},"lastActive":1.446709787966E9,"devices":[],"success":true,"created":1.43935302887E9,"unsubscribeChannels":[],"userId":"123456","events":{"purchase":{"firstTime":1.460514593026E9,"lastTime":1.505189741992E9,"count":70},"eventName1":{"firstTime":1.4735664E9,"lastTime":1.5051888E9,"count":1}},"userBucket":358,"states":{}}]}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
44
44
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,24 +21,24 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- 77c3cb5a37e7e738ab1e734b86c04d01
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgsIAxCtAyDnl-HNBQ; expires=Sun, 01-Nov-2020 17:04:39 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:39 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '44'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:39 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"
|
41
|
+
string: '{"response":[{"success":true,"abTests":[]}]}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
44
44
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,24 +21,24 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- 37ed4e82db5ccf5c93ec2c0cb02b88f8
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgoIAxBnIOaX4c0F; expires=Sun, 01-Nov-2020 17:04:39 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:39 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '44'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:39 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"
|
41
|
+
string: '{"response":[{"success":true,"abTests":[]}]}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
44
44
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,24 +21,24 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- a0201485c5fa5fd2db265a7c401717de
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgsIAxDZBiDll-HNBQ; expires=Sun, 01-Nov-2020 17:04:37 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:37 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '268'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:37 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"files":["https://leanplum_export.storage.googleapis.com/export-4727756026281984-d5969d55-f242-48a6-85a3-165af08e2306-output-0"],"
|
41
|
+
string: '{"response":[{"numBytes":36590,"jobId":"export_4727756026281984_2904941266315269120","numSessions":101,"success":true,"files":["https://leanplum_export.storage.googleapis.com/export-4727756026281984-d5969d55-f242-48a6-85a3-165af08e2306-output-0"],"state":"FINISHED"}]}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
44
44
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,25 +21,25 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- e786087f6475468460337c3b45cb9805
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgsIAxDdBCDol-HNBQ; expires=Sun, 01-Nov-2020 17:04:40 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:40 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '165'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:40 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"success":true,"messages":[{"
|
42
|
-
Message","active":false,"
|
41
|
+
string: '{"response":[{"success":true,"messages":[{"messageType":"Push Notification","created":1.440091595799E9,"name":"New
|
42
|
+
Message","active":false,"id":5670583287676928}]}]}'
|
43
43
|
http_version:
|
44
|
-
recorded_at:
|
44
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
45
45
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,24 +21,24 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- c8b9d8cd7e5d05d04d44d147f7c3dd46
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgsIAxDzBSDml-HNBQ; expires=Sun, 01-Nov-2020 17:04:38 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:38 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '123'
|
35
35
|
Expires:
|
36
|
-
-
|
36
|
+
- Tue, 12 Sep 2017 21:04:38 GMT
|
37
37
|
Cache-Control:
|
38
38
|
- private
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"response":[{"
|
41
|
+
string: '{"response":[{"regions":{},"success":true,"messages":{},"vars":{},"interfaceRules":[],"variants":[],"interfaceEvents":[]}]}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
44
44
|
recorded_with: VCR 3.0.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
@@ -21,20 +21,20 @@ http_interactions:
|
|
21
21
|
Access-Control-Allow-Origin:
|
22
22
|
- "*"
|
23
23
|
Content-Type:
|
24
|
-
- application/json;
|
24
|
+
- application/json;charset=utf-8
|
25
25
|
X-Cloud-Trace-Context:
|
26
|
-
-
|
26
|
+
- 9dcf56897ff8e8ad7c535cbfd8b68a58
|
27
27
|
Set-Cookie:
|
28
|
-
- GOOGAPPUID=
|
28
|
+
- GOOGAPPUID=xCgsIAxD7AyDol-HNBQ; expires=Sun, 01-Nov-2020 17:04:40 GMT; path=/
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Tue, 12 Sep 2017 21:04:40 GMT
|
31
31
|
Server:
|
32
32
|
- Google Frontend
|
33
33
|
Content-Length:
|
34
34
|
- '73'
|
35
35
|
body:
|
36
36
|
encoding: UTF-8
|
37
|
-
string: '{"response":[{"error":{"message":"Message not found."}
|
37
|
+
string: '{"response":[{"success":false,"error":{"message":"Message not found."}}]}'
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
40
40
|
recorded_with: VCR 3.0.3
|
@@ -2,13 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_DEVELOPMENT_KEY>&devMode=false&time=
|
5
|
+
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_DEVELOPMENT_KEY>&devMode=false&time=1505188800
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"data":[{"action":"setUserAttributes","resetAnomalies":true,"userId":123456}]}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Content-Type:
|
13
13
|
- application/json
|
14
14
|
Accept-Encoding:
|
@@ -23,24 +23,24 @@ http_interactions:
|
|
23
23
|
Access-Control-Allow-Origin:
|
24
24
|
- "*"
|
25
25
|
Content-Type:
|
26
|
-
- application/json;
|
26
|
+
- application/json;charset=utf-8
|
27
27
|
X-Cloud-Trace-Context:
|
28
|
-
-
|
28
|
+
- 1c1ef65d9076a3950fa6158b5a22cdad
|
29
29
|
Set-Cookie:
|
30
|
-
- GOOGAPPUID=
|
30
|
+
- GOOGAPPUID=xCgsIAxDIBiDfl-HNBQ; expires=Sun, 01-Nov-2020 17:04:31 GMT; path=/
|
31
31
|
Date:
|
32
|
-
-
|
32
|
+
- Tue, 12 Sep 2017 21:04:31 GMT
|
33
33
|
Server:
|
34
34
|
- Google Frontend
|
35
35
|
Content-Length:
|
36
36
|
- '31'
|
37
37
|
Expires:
|
38
|
-
-
|
38
|
+
- Tue, 12 Sep 2017 21:04:31 GMT
|
39
39
|
Cache-Control:
|
40
40
|
- private
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
43
|
string: '{"response":[{"success":true}]}'
|
44
44
|
http_version:
|
45
|
-
recorded_at:
|
45
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
46
46
|
recorded_with: VCR 3.0.3
|
@@ -2,13 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=
|
5
|
+
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=1505188800
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"data":[{"userId":123456,"action":"setUserAttributes","userAttributes":{"first_name":"Mike","last_name":"Jones","gender":"m","email":"still_tippin@test.com","create_date":"2010-01-01","is_tipping":true}}]}'
|
8
|
+
string: '{"data":[{"userId":123456,"action":"setUserAttributes","userAttributes":{"first_name":"Mike","last_name":"Jones","gender":"m","email":"still_tippin@test.com","create_date":"2010-01-01","is_tipping":true},"events":{"eventName1":{"count":1,"firstTime":1505102400,"lastTime":1505188800}}}]}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
11
|
+
- Faraday v0.13.1
|
12
12
|
Content-Type:
|
13
13
|
- application/json
|
14
14
|
Accept-Encoding:
|
@@ -23,25 +23,24 @@ http_interactions:
|
|
23
23
|
Access-Control-Allow-Origin:
|
24
24
|
- "*"
|
25
25
|
Content-Type:
|
26
|
-
- application/json;
|
26
|
+
- application/json;charset=utf-8
|
27
27
|
X-Cloud-Trace-Context:
|
28
|
-
-
|
28
|
+
- 10338d882b43cc3fc371beeb52d6b40b
|
29
29
|
Set-Cookie:
|
30
|
-
- GOOGAPPUID=
|
30
|
+
- GOOGAPPUID=xCgoIAxBHIN6X4c0F; expires=Sun, 01-Nov-2020 17:04:30 GMT; path=/
|
31
31
|
Date:
|
32
|
-
-
|
32
|
+
- Tue, 12 Sep 2017 21:04:30 GMT
|
33
33
|
Server:
|
34
34
|
- Google Frontend
|
35
35
|
Content-Length:
|
36
|
-
- '
|
36
|
+
- '31'
|
37
37
|
Expires:
|
38
|
-
-
|
38
|
+
- Tue, 12 Sep 2017 21:04:30 GMT
|
39
39
|
Cache-Control:
|
40
40
|
- private
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
|
-
string: '{"response":[{"success":true
|
44
|
-
detected (5 days behind). Rewriting timestamp."}}]}'
|
43
|
+
string: '{"response":[{"success":true}]}'
|
45
44
|
http_version:
|
46
|
-
recorded_at:
|
45
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
47
46
|
recorded_with: VCR 3.0.3
|
@@ -2,14 +2,14 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=
|
5
|
+
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=1505188800
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"data":[{"action":"track","event":"purchase","userId":123456,"time":
|
9
|
-
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":
|
8
|
+
string: '{"data":[{"action":"track","event":"purchase","userId":123456,"time":1505188800,"params":{"some_timestamp":"2015-05-01
|
9
|
+
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":1505188200}]}'
|
10
10
|
headers:
|
11
11
|
User-Agent:
|
12
|
-
- Faraday v0.
|
12
|
+
- Faraday v0.13.1
|
13
13
|
Content-Type:
|
14
14
|
- application/json
|
15
15
|
Accept-Encoding:
|
@@ -24,26 +24,24 @@ http_interactions:
|
|
24
24
|
Access-Control-Allow-Origin:
|
25
25
|
- "*"
|
26
26
|
Content-Type:
|
27
|
-
- application/json;
|
27
|
+
- application/json;charset=utf-8
|
28
28
|
X-Cloud-Trace-Context:
|
29
|
-
-
|
29
|
+
- 8dc6623be625d67ff132d4c00264090a
|
30
30
|
Set-Cookie:
|
31
|
-
- GOOGAPPUID=
|
31
|
+
- GOOGAPPUID=xCgsIAxCtByDgl-HNBQ; expires=Sun, 01-Nov-2020 17:04:32 GMT; path=/
|
32
32
|
Date:
|
33
|
-
-
|
33
|
+
- Tue, 12 Sep 2017 21:04:32 GMT
|
34
34
|
Server:
|
35
35
|
- Google Frontend
|
36
36
|
Content-Length:
|
37
|
-
- '
|
37
|
+
- '82'
|
38
38
|
Expires:
|
39
|
-
-
|
39
|
+
- Tue, 12 Sep 2017 21:04:32 GMT
|
40
40
|
Cache-Control:
|
41
41
|
- private
|
42
42
|
body:
|
43
43
|
encoding: UTF-8
|
44
|
-
string: '{"response":[{"
|
45
|
-
clock skew detected (5 days behind). Rewriting timestamp."}},{"isOffline":true,"success":true,"warning":{"message":"Device
|
46
|
-
clock skew detected (5 days behind). Rewriting timestamp."}}]}'
|
44
|
+
string: '{"response":[{"success":true,"isOffline":true},{"success":true,"isOffline":true}]}'
|
47
45
|
http_version:
|
48
|
-
recorded_at:
|
46
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
49
47
|
recorded_with: VCR 3.0.3
|
@@ -2,14 +2,14 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=
|
5
|
+
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=1505188800
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"data":[{"userId":123456,"action":"setUserAttributes","userAttributes":{"first_name":"Mike","last_name":"Jones","gender":"m","email":"still_tippin@test.com","create_date":"2010-01-01","is_tipping":true}},{"action":"track","event":"purchase","userId":123456,"time":
|
9
|
-
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":
|
8
|
+
string: '{"data":[{"userId":123456,"action":"setUserAttributes","userAttributes":{"first_name":"Mike","last_name":"Jones","gender":"m","email":"still_tippin@test.com","create_date":"2010-01-01","is_tipping":true},"events":{"eventName1":{"count":1,"firstTime":1505102400,"lastTime":1505188800}}},{"action":"track","event":"purchase","userId":123456,"time":1505188800,"params":{"some_timestamp":"2015-05-01
|
9
|
+
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":1505188200}]}'
|
10
10
|
headers:
|
11
11
|
User-Agent:
|
12
|
-
- Faraday v0.
|
12
|
+
- Faraday v0.13.1
|
13
13
|
Content-Type:
|
14
14
|
- application/json
|
15
15
|
Accept-Encoding:
|
@@ -24,27 +24,24 @@ http_interactions:
|
|
24
24
|
Access-Control-Allow-Origin:
|
25
25
|
- "*"
|
26
26
|
Content-Type:
|
27
|
-
- application/json;
|
27
|
+
- application/json;charset=utf-8
|
28
28
|
X-Cloud-Trace-Context:
|
29
|
-
-
|
29
|
+
- e30df8f39eca3f77705e8ae2c82d76d8
|
30
30
|
Set-Cookie:
|
31
|
-
- GOOGAPPUID=
|
31
|
+
- GOOGAPPUID=xCgsIAxDCByDil-HNBQ; expires=Sun, 01-Nov-2020 17:04:35 GMT; path=/
|
32
32
|
Date:
|
33
|
-
-
|
33
|
+
- Tue, 12 Sep 2017 21:04:35 GMT
|
34
34
|
Server:
|
35
35
|
- Google Frontend
|
36
36
|
Content-Length:
|
37
|
-
- '
|
37
|
+
- '99'
|
38
38
|
Expires:
|
39
|
-
-
|
39
|
+
- Tue, 12 Sep 2017 21:04:35 GMT
|
40
40
|
Cache-Control:
|
41
41
|
- private
|
42
42
|
body:
|
43
43
|
encoding: UTF-8
|
44
|
-
string: '{"response":[{"success":true,"
|
45
|
-
detected (5 days behind). Rewriting timestamp."}},{"isOffline":true,"success":true,"warning":{"message":"Device
|
46
|
-
clock skew detected (5 days behind). Rewriting timestamp."}},{"isOffline":true,"success":true,"warning":{"message":"Device
|
47
|
-
clock skew detected (5 days behind). Rewriting timestamp."}}]}'
|
44
|
+
string: '{"response":[{"success":true},{"success":true,"isOffline":true},{"success":true,"isOffline":true}]}'
|
48
45
|
http_version:
|
49
|
-
recorded_at:
|
46
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
50
47
|
recorded_with: VCR 3.0.3
|
@@ -2,14 +2,14 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=
|
5
|
+
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=1505188800
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"data":[{"action":"track","event":"purchase","userId":123456,"time":
|
9
|
-
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":
|
8
|
+
string: '{"data":[{"action":"track","event":"purchase","userId":123456,"time":1473652800,"params":{"some_timestamp":"2015-05-01
|
9
|
+
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":1473652200}]}'
|
10
10
|
headers:
|
11
11
|
User-Agent:
|
12
|
-
- Faraday v0.
|
12
|
+
- Faraday v0.13.1
|
13
13
|
Content-Type:
|
14
14
|
- application/json
|
15
15
|
Accept-Encoding:
|
@@ -24,37 +24,36 @@ http_interactions:
|
|
24
24
|
Access-Control-Allow-Origin:
|
25
25
|
- "*"
|
26
26
|
Content-Type:
|
27
|
-
- application/json;
|
27
|
+
- application/json;charset=utf-8
|
28
28
|
X-Cloud-Trace-Context:
|
29
|
-
-
|
29
|
+
- 0b2d4c78bb712eb607f011ba61eb09cf
|
30
30
|
Set-Cookie:
|
31
|
-
- GOOGAPPUID=
|
31
|
+
- GOOGAPPUID=xCgoIAxAAIKGb4c0F; expires=Sun, 01-Nov-2020 17:12:02 GMT; path=/
|
32
32
|
Date:
|
33
|
-
-
|
33
|
+
- Tue, 12 Sep 2017 21:12:02 GMT
|
34
34
|
Server:
|
35
35
|
- Google Frontend
|
36
36
|
Content-Length:
|
37
|
-
- '
|
37
|
+
- '163'
|
38
38
|
Expires:
|
39
|
-
-
|
39
|
+
- Tue, 12 Sep 2017 21:12:02 GMT
|
40
40
|
Cache-Control:
|
41
41
|
- private
|
42
42
|
body:
|
43
43
|
encoding: UTF-8
|
44
|
-
string: '{"response":[{"isOffline":true,"success":true,"warning":{"message":"
|
45
|
-
|
46
|
-
clock skew detected (5 days behind). Rewriting timestamp."}}]}'
|
44
|
+
string: '{"response":[{"success":true,"isOffline":true},{"success":true,"warning":{"message":"Past
|
45
|
+
event detected (365 days ago). Rewriting timestamp."},"isOffline":true}]}'
|
47
46
|
http_version:
|
48
|
-
recorded_at:
|
47
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
49
48
|
- request:
|
50
49
|
method: post
|
51
|
-
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_DEVELOPMENT_KEY>&devMode=false&time=
|
50
|
+
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_DEVELOPMENT_KEY>&devMode=false&time=1505188800
|
52
51
|
body:
|
53
52
|
encoding: UTF-8
|
54
53
|
string: '{"data":[{"action":"setUserAttributes","resetAnomalies":true,"userId":123456},{"action":"setUserAttributes","resetAnomalies":true,"userId":54321}]}'
|
55
54
|
headers:
|
56
55
|
User-Agent:
|
57
|
-
- Faraday v0.
|
56
|
+
- Faraday v0.13.1
|
58
57
|
Content-Type:
|
59
58
|
- application/json
|
60
59
|
Accept-Encoding:
|
@@ -69,24 +68,24 @@ http_interactions:
|
|
69
68
|
Access-Control-Allow-Origin:
|
70
69
|
- "*"
|
71
70
|
Content-Type:
|
72
|
-
- application/json;
|
71
|
+
- application/json;charset=utf-8
|
73
72
|
X-Cloud-Trace-Context:
|
74
|
-
-
|
73
|
+
- b565a9236508b41e2842074ccb6c4422
|
75
74
|
Set-Cookie:
|
76
|
-
- GOOGAPPUID=
|
75
|
+
- GOOGAPPUID=xCgsIAxDSAyCim-HNBQ; expires=Sun, 01-Nov-2020 17:12:02 GMT; path=/
|
77
76
|
Date:
|
78
|
-
-
|
77
|
+
- Tue, 12 Sep 2017 21:12:02 GMT
|
79
78
|
Server:
|
80
79
|
- Google Frontend
|
81
80
|
Content-Length:
|
82
81
|
- '48'
|
83
82
|
Expires:
|
84
|
-
-
|
83
|
+
- Tue, 12 Sep 2017 21:12:02 GMT
|
85
84
|
Cache-Control:
|
86
85
|
- private
|
87
86
|
body:
|
88
87
|
encoding: UTF-8
|
89
88
|
string: '{"response":[{"success":true},{"success":true}]}'
|
90
89
|
http_version:
|
91
|
-
recorded_at:
|
90
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
92
91
|
recorded_with: VCR 3.0.3
|
@@ -2,14 +2,14 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=
|
5
|
+
uri: https://www.leanplum.com/api?action=multi&apiVersion=1.0.6&appId=<LEANPLUM_APP_ID>&clientKey=<LEANPLUM_PRODUCTION_KEY>&devMode=false&time=1505188800
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"data":[{"action":"track","event":"purchase","userId":123456,"time":
|
9
|
-
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":
|
8
|
+
string: '{"data":[{"action":"track","event":"purchase","userId":123456,"time":1505188800,"allowOffline":true,"params":{"some_timestamp":"2015-05-01
|
9
|
+
01:02:03"}},{"action":"track","event":"purchase_page_view","userId":54321,"time":1505188200,"allowOffline":true}]}'
|
10
10
|
headers:
|
11
11
|
User-Agent:
|
12
|
-
- Faraday v0.
|
12
|
+
- Faraday v0.13.1
|
13
13
|
Content-Type:
|
14
14
|
- application/json
|
15
15
|
Accept-Encoding:
|
@@ -24,26 +24,24 @@ http_interactions:
|
|
24
24
|
Access-Control-Allow-Origin:
|
25
25
|
- "*"
|
26
26
|
Content-Type:
|
27
|
-
- application/json;
|
27
|
+
- application/json;charset=utf-8
|
28
28
|
X-Cloud-Trace-Context:
|
29
|
-
-
|
29
|
+
- 9de3f0a7f5bd26fcbf9edada00fd78d6
|
30
30
|
Set-Cookie:
|
31
|
-
- GOOGAPPUID=
|
31
|
+
- GOOGAPPUID=xCgoIAxB1IOCX4c0F; expires=Sun, 01-Nov-2020 17:04:32 GMT; path=/
|
32
32
|
Date:
|
33
|
-
-
|
33
|
+
- Tue, 12 Sep 2017 21:04:32 GMT
|
34
34
|
Server:
|
35
35
|
- Google Frontend
|
36
36
|
Content-Length:
|
37
|
-
- '
|
37
|
+
- '82'
|
38
38
|
Expires:
|
39
|
-
-
|
39
|
+
- Tue, 12 Sep 2017 21:04:32 GMT
|
40
40
|
Cache-Control:
|
41
41
|
- private
|
42
42
|
body:
|
43
43
|
encoding: UTF-8
|
44
|
-
string: '{"response":[{"
|
45
|
-
clock skew detected (5 days behind). Rewriting timestamp."}},{"isOffline":true,"success":true,"warning":{"message":"Device
|
46
|
-
clock skew detected (5 days behind). Rewriting timestamp."}}]}'
|
44
|
+
string: '{"response":[{"success":true,"isOffline":true},{"success":true,"isOffline":true}]}'
|
47
45
|
http_version:
|
48
|
-
recorded_at:
|
46
|
+
recorded_at: Tue, 12 Sep 2017 04:00:00 GMT
|
49
47
|
recorded_with: VCR 3.0.3
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leanplum_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lumos Labs, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: awesome_print
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
182
|
requirements:
|
183
183
|
- - ">="
|
184
184
|
- !ruby/object:Gem::Version
|
185
|
-
version: 1.
|
185
|
+
version: 2.1.5
|
186
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
187
|
requirements:
|
188
188
|
- - ">="
|