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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43f7d678d33a30f6b8f4a3d50a875f3536328ad1
4
- data.tar.gz: 7bb19cca732b8023d580d110423fa46f071c64a6
3
+ metadata.gz: 27ddea1f060526b4036a2a16b599545a7fc7e6da
4
+ data.tar.gz: 36fbd9aa4ba81f37079bdfc0b53e67ca1793131e
5
5
  SHA512:
6
- metadata.gz: eb6851bf1dd347cc0f0e4b91a8d529ac91a38bb61898cc0172491e81d21da464e4c55b3a561750f2078249dcb52bf51ab065eb882c38ac4e729f4565910d74d5
7
- data.tar.gz: 0bb6461320be68b9cdd09f5a03ff1ca73056cf06db7b7eb99a77d22d7d9fe6bffa0ad8052bfa416cc27e132e61da673f4b9eed6bc50cdf940068b8f2de28b45f
6
+ metadata.gz: 6db5b8d90b017b3028ac90e890a062fd74f5961e81fca4466f6b6a99df3c4b6e4d74a122e90bf7258528f56fac7525634423a54400a433b063550f4d7faa3ae2
7
+ data.tar.gz: da96de06564daca90953d5833e9605df430ac0e3c8464abed0dd5c26f92dc94dd9796e86c382f148839a0cdd1615a47b03e6ab891947df7a996d8716aa2adba0
@@ -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
@@ -1,3 +1,3 @@
1
1
  module LeanplumApi
2
- VERSION = '4.0.3'
2
+ VERSION = '4.1.0'.freeze
3
3
  end
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.3
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-11-23 00:00:00.000000000 Z
12
+ date: 2017-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport