leanplum_api 4.0.3 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/leanplum_api/api.rb +10 -0
- data/lib/leanplum_api/connection.rb +6 -0
- data/lib/leanplum_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27ddea1f060526b4036a2a16b599545a7fc7e6da
|
4
|
+
data.tar.gz: 36fbd9aa4ba81f37079bdfc0b53e67ca1793131e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6db5b8d90b017b3028ac90e890a062fd74f5961e81fca4466f6b6a99df3c4b6e4d74a122e90bf7258528f56fac7525634423a54400a433b063550f4d7faa3ae2
|
7
|
+
data.tar.gz: da96de06564daca90953d5833e9605df430ac0e3c8464abed0dd5c26f92dc94dd9796e86c382f148839a0cdd1615a47b03e6ab891947df7a996d8716aa2adba0
|
data/lib/leanplum_api/api.rb
CHANGED
@@ -97,6 +97,16 @@ module LeanplumApi
|
|
97
97
|
development_connection.multi(request_data)
|
98
98
|
end
|
99
99
|
|
100
|
+
def import_csv(bucket, file_path, user_attributes = true)
|
101
|
+
request_data = {
|
102
|
+
createJob: true,
|
103
|
+
defaultAction: user_attributes ? SET_USER_ATTRIBUTES : SET_DEVICE_ATTRIBUTES,
|
104
|
+
gcsBucket: bucket,
|
105
|
+
file: file_path
|
106
|
+
}
|
107
|
+
development_connection.multi_dev(request_data)
|
108
|
+
end
|
109
|
+
|
100
110
|
private
|
101
111
|
|
102
112
|
def production_connection
|
@@ -16,6 +16,12 @@ module LeanplumApi
|
|
16
16
|
end.body['response']
|
17
17
|
end
|
18
18
|
|
19
|
+
def multi_dev(payload)
|
20
|
+
connection
|
21
|
+
.post("#{LEANPLUM_API_PATH}?#{authed_multi_param_string}&#{URI.encode_www_form(payload)}")
|
22
|
+
.body['response']
|
23
|
+
end
|
24
|
+
|
19
25
|
private
|
20
26
|
|
21
27
|
def authentication_params
|
data/lib/leanplum_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leanplum_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lumos Labs, Inc.
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|