mparticle 1.0.2 → 1.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 +4 -4
- data/docs/Batch.md +2 -0
- data/example/main.rb +3 -0
- data/lib/mparticle/api_client.rb +1 -1
- data/lib/mparticle/models/batch.rb +22 -4
- data/mparticle.gemspec +1 -1
- metadata +3 -6
- data/example/.main.rb.swn +0 -0
- data/example/.main.rb.swo +0 -0
- data/example/.main.rb.swp +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93da0cbe028977a0c56b74b7fd2aabc3cdb039e0
|
4
|
+
data.tar.gz: 3b9c86be00345933b534c241c50bc0ef3493500d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f11b73ccf181d9fe976013f7cf2e2d05277cd3e43e40237a93a1962dc3b8d1fac46bdec7a6ab945d79b75111fb80fd52b24dab0893924a62d2a255c339a012ce
|
7
|
+
data.tar.gz: 73c9d6163d9684d9bfa9420ca9c20d496d356e1bf01a79da52ce03fe6b7d76d70873fa8245d1ea95650610db8b5382db4a1473f609c4babcc306628fac1f46e8
|
data/docs/Batch.md
CHANGED
@@ -14,5 +14,7 @@ Name | Type | Description | Notes
|
|
14
14
|
**deleted_user_attributes** | **Array<String>** | | [optional]
|
15
15
|
**user_identities** | [**UserIdentities**](UserIdentities.md) | | [optional]
|
16
16
|
**api_key** | **String** | | [optional]
|
17
|
+
**mpid** | **Integer** | | [optional]
|
18
|
+
**mp_deviceid** | **String** | | [optional]
|
17
19
|
|
18
20
|
|
data/example/main.rb
CHANGED
@@ -23,6 +23,9 @@ app_event.custom_attributes = { 'Test key' => 'Test value' }
|
|
23
23
|
batch.events = [MParticle::SessionStartEvent.new, app_event, MParticle::SessionEndEvent.new]
|
24
24
|
batch.user_identities = user_identities
|
25
25
|
|
26
|
+
batch.mpid = 600868121729048600
|
27
|
+
batch.mp_deviceid = "59780f39-d7a0-4ebe-9950-280f937c29e2"
|
28
|
+
|
26
29
|
begin
|
27
30
|
# send events
|
28
31
|
thread = api_instance.upload_events(batch) { |data, status_code, headers|
|
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.3"
|
23
23
|
@default_headers = {
|
24
24
|
'Content-Type' => "application/json",
|
25
25
|
'User-Agent' => @user_agent
|
@@ -25,6 +25,10 @@ module MParticle
|
|
25
25
|
|
26
26
|
attr_accessor :api_key
|
27
27
|
|
28
|
+
attr_accessor :mpid
|
29
|
+
|
30
|
+
attr_accessor :mp_deviceid
|
31
|
+
|
28
32
|
class EnumAttributeValidator
|
29
33
|
attr_reader :datatype
|
30
34
|
attr_reader :allowable_values
|
@@ -100,7 +104,9 @@ module MParticle
|
|
100
104
|
:'user_attributes' => :'user_attributes',
|
101
105
|
:'deleted_user_attributes' => :'deleted_user_attributes',
|
102
106
|
:'user_identities' => :'user_identities',
|
103
|
-
:'api_key' => :'api_key'
|
107
|
+
:'api_key' => :'api_key',
|
108
|
+
:'mpid' => :'mpid',
|
109
|
+
:'mp_deviceid' => :'mp_deviceid'
|
104
110
|
}
|
105
111
|
end
|
106
112
|
|
@@ -117,7 +123,9 @@ module MParticle
|
|
117
123
|
:'user_attributes' => :'Object',
|
118
124
|
:'deleted_user_attributes' => :'Array<String>',
|
119
125
|
:'user_identities' => :'UserIdentities',
|
120
|
-
:'api_key' => :'String'
|
126
|
+
:'api_key' => :'String',
|
127
|
+
:'mpid' => :'Integer',
|
128
|
+
:'mp_deviceid' => :'String'
|
121
129
|
}
|
122
130
|
end
|
123
131
|
|
@@ -177,6 +185,14 @@ module MParticle
|
|
177
185
|
self.api_key = attributes[:'api_key']
|
178
186
|
end
|
179
187
|
|
188
|
+
if attributes.has_key?(:'mpid')
|
189
|
+
self.mpid = attributes[:'mpid']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'mp_deviceid')
|
193
|
+
self.mp_deviceid = attributes[:'mp_deviceid']
|
194
|
+
end
|
195
|
+
|
180
196
|
end
|
181
197
|
|
182
198
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -224,7 +240,9 @@ module MParticle
|
|
224
240
|
user_attributes == o.user_attributes &&
|
225
241
|
deleted_user_attributes == o.deleted_user_attributes &&
|
226
242
|
user_identities == o.user_identities &&
|
227
|
-
api_key == o.api_key
|
243
|
+
api_key == o.api_key &&
|
244
|
+
mpid == o.mpid &&
|
245
|
+
mp_deviceid == o.mp_deviceid
|
228
246
|
end
|
229
247
|
|
230
248
|
# @see the `==` method
|
@@ -236,7 +254,7 @@ module MParticle
|
|
236
254
|
# Calculates hash code according to all attributes.
|
237
255
|
# @return [Fixnum] Hash code
|
238
256
|
def hash
|
239
|
-
[events, source_request_id, environment, ip, schema_version, device_info, application_info, user_attributes, deleted_user_attributes, user_identities, api_key].hash
|
257
|
+
[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
|
240
258
|
end
|
241
259
|
|
242
260
|
# Builds the object from hash
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mParticle Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -92,9 +92,6 @@ files:
|
|
92
92
|
- docs/ShoppingCart.md
|
93
93
|
- docs/SourceInformation.md
|
94
94
|
- docs/UserIdentities.md
|
95
|
-
- example/.main.rb.swn
|
96
|
-
- example/.main.rb.swo
|
97
|
-
- example/.main.rb.swp
|
98
95
|
- example/main.rb
|
99
96
|
- lib/mparticle.rb
|
100
97
|
- lib/mparticle/api/events_api.rb
|
@@ -156,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
153
|
version: '0'
|
157
154
|
requirements: []
|
158
155
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.5.2
|
156
|
+
rubygems_version: 2.5.2.3
|
160
157
|
signing_key:
|
161
158
|
specification_version: 4
|
162
159
|
summary: Ruby client for the mParticle platform
|
data/example/.main.rb.swn
DELETED
Binary file
|
data/example/.main.rb.swo
DELETED
Binary file
|
data/example/.main.rb.swp
DELETED
Binary file
|