mparticle 1.0.7 → 1.0.8
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 +4 -4
- data/docs/Batch.md +1 -0
- data/example/main.rb +3 -1
- data/lib/mparticle/api_client.rb +1 -1
- data/lib/mparticle/models/batch.rb +13 -4
- data/lib/mparticle/version.rb +1 -1
- data/mparticle.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7a6e50f3de49a07b31edbb8e64d0100d172f07e557c53ce2afa1e64a7afcc77
|
4
|
+
data.tar.gz: e005d8bda1918bba72c7b47fe59761dfaa7b3931de76206e3324ef8d1275a1fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3360ce980762c548ac98bf1d921bacb263fe688149ef98a1c29e9e9803f3e2fa4b840c9d048b94951ebb0ae14515cbab30cfb0d4cc3b19a8bf237e989da6c97d
|
7
|
+
data.tar.gz: dbbd4d8b4cc050d54d9f6b3b453cc777f5a746a742bebe0715704e1467667057dde256921a750b692f6977c048ba433a7e7bc0e0c3baac30f0a98d6c20533f8a
|
data/docs/Batch.md
CHANGED
data/example/main.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
# load the gem
|
4
4
|
require 'mparticle'
|
5
|
+
require 'date'
|
5
6
|
config = MParticle::Configuration.new
|
6
7
|
config.api_key = 'REPLACE WITH API KEY'
|
7
8
|
config.api_secret = 'REPLACE WITH API SECRET'
|
@@ -10,6 +11,7 @@ config.api_secret = 'REPLACE WITH API SECRET'
|
|
10
11
|
api_instance = MParticle::EventsApi.new(config)
|
11
12
|
|
12
13
|
batch = MParticle::Batch.new
|
14
|
+
batch.timestamp_unixtime_ms = DateTime.now.strftime('%Q').to_i
|
13
15
|
batch.environment = 'development'
|
14
16
|
|
15
17
|
user_identities = MParticle::UserIdentities.new
|
@@ -86,5 +88,5 @@ begin
|
|
86
88
|
# wait for the thread, otherwise process may exit too early
|
87
89
|
thread.join
|
88
90
|
rescue MParticle::ApiError => e
|
89
|
-
puts "Exception when calling mParticle: #{e}"
|
91
|
+
puts "Exception when calling mParticle: #{e.response_body}"
|
90
92
|
end
|
data/lib/mparticle/api_client.rb
CHANGED
@@ -19,7 +19,7 @@ module MParticle
|
|
19
19
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
20
20
|
def initialize(config)
|
21
21
|
@config = config
|
22
|
-
@user_agent = "mParticle Ruby client/1.0.
|
22
|
+
@user_agent = "mParticle Ruby client/1.0.8"
|
23
23
|
@default_headers = {
|
24
24
|
'Content-Type' => "application/json",
|
25
25
|
'User-Agent' => @user_agent
|
@@ -31,6 +31,8 @@ module MParticle
|
|
31
31
|
|
32
32
|
attr_accessor :mp_deviceid
|
33
33
|
|
34
|
+
attr_accessor :timestamp_unixtime_ms
|
35
|
+
|
34
36
|
class EnumAttributeValidator
|
35
37
|
attr_reader :datatype
|
36
38
|
attr_reader :allowable_values
|
@@ -109,7 +111,8 @@ module MParticle
|
|
109
111
|
:'user_identities' => :'user_identities',
|
110
112
|
:'api_key' => :'api_key',
|
111
113
|
:'mpid' => :'mpid',
|
112
|
-
:'mp_deviceid' => :'mp_deviceid'
|
114
|
+
:'mp_deviceid' => :'mp_deviceid',
|
115
|
+
:'timestamp_unixtime_ms' => :'timestamp_unixtime_ms'
|
113
116
|
}
|
114
117
|
end
|
115
118
|
|
@@ -128,7 +131,8 @@ module MParticle
|
|
128
131
|
:'user_identities' => :'UserIdentities',
|
129
132
|
:'api_key' => :'String',
|
130
133
|
:'mpid' => :'Integer',
|
131
|
-
:'mp_deviceid' => :'String'
|
134
|
+
:'mp_deviceid' => :'String',
|
135
|
+
:'timestamp_unixtime_ms' => :'Integer'
|
132
136
|
}
|
133
137
|
end
|
134
138
|
|
@@ -196,6 +200,10 @@ module MParticle
|
|
196
200
|
self.mp_deviceid = attributes[:'mp_deviceid']
|
197
201
|
end
|
198
202
|
|
203
|
+
if attributes.has_key?(:'timestamp_unixtime_ms')
|
204
|
+
self.timestamp_unixtime_ms = attributes[:'timestamp_unixtime_ms']
|
205
|
+
end
|
206
|
+
|
199
207
|
end
|
200
208
|
|
201
209
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -245,7 +253,8 @@ module MParticle
|
|
245
253
|
user_identities == o.user_identities &&
|
246
254
|
api_key == o.api_key &&
|
247
255
|
mpid == o.mpid &&
|
248
|
-
mp_deviceid == o.mp_deviceid
|
256
|
+
mp_deviceid == o.mp_deviceid &&
|
257
|
+
timestamp_unixtime_ms == o.timestamp_unixtime_ms
|
249
258
|
end
|
250
259
|
|
251
260
|
# @see the `==` method
|
@@ -257,7 +266,7 @@ module MParticle
|
|
257
266
|
# Calculates hash code according to all attributes.
|
258
267
|
# @return [Fixnum] Hash code
|
259
268
|
def hash
|
260
|
-
[events, source_request_id, environment, ip, schema_version, device_info, application_info, user_attributes, deleted_user_attributes, user_identities, api_key, mpid, mp_deviceid].hash
|
269
|
+
[events, source_request_id, environment, ip, schema_version, device_info, application_info, user_attributes, deleted_user_attributes, user_identities, api_key, mpid, mp_deviceid, timestamp_unixtime_ms].hash
|
261
270
|
end
|
262
271
|
|
263
272
|
# Builds the object from hash
|
data/lib/mparticle/version.rb
CHANGED
data/mparticle.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mparticle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mParticle Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|