braze_ruby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/braze_ruby/api.rb +2 -0
- data/lib/braze_ruby/endpoints.rb +1 -0
- data/lib/braze_ruby/endpoints/delete_users.rb +21 -0
- data/lib/braze_ruby/rest.rb +1 -0
- data/lib/braze_ruby/rest/delete_users.rb +12 -0
- data/lib/braze_ruby/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e78db383c73ab0375f4c015ce0f99d17e7ed7035
|
4
|
+
data.tar.gz: c5d7efa4e531f247e114288e2afbba7e3f6107ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7400b2b2035c80486acd34dfbe77fbde74c8a56f7afc7837e9a4e773a9f636ac13d94de054dc709a040dfd5195bfc92b5534f5ad4b1108a6a85dfb909c4e1788
|
7
|
+
data.tar.gz: 1a575b9c132c8a1489bf8e9fa873dc2175ee158fd1eb05f70793872f0a9c35ebd4324f4d197ede7ba383e8194116272da9c0f4032156562fd78e6ba017dffc05
|
data/README.md
CHANGED
@@ -137,6 +137,13 @@ api.export_users(external_ids: [1])
|
|
137
137
|
```ruby
|
138
138
|
api.export_users(segment_id: segment_id, callback_endpoint: 'https://example.com')
|
139
139
|
```
|
140
|
+
### Delete Users
|
141
|
+
|
142
|
+
#####
|
143
|
+
Delete Braze Users with an array of external_ids
|
144
|
+
```ruby
|
145
|
+
api.delete_users([1, 2, 3])
|
146
|
+
```
|
140
147
|
|
141
148
|
## Debugging
|
142
149
|
|
data/lib/braze_ruby/api.rb
CHANGED
@@ -3,6 +3,7 @@ require 'braze_ruby/endpoints/track_users'
|
|
3
3
|
require 'braze_ruby/endpoints/send_messages'
|
4
4
|
require 'braze_ruby/endpoints/schedule_messages'
|
5
5
|
require 'braze_ruby/endpoints/email_status'
|
6
|
+
require 'braze_ruby/endpoints/delete_users'
|
6
7
|
|
7
8
|
module BrazeRuby
|
8
9
|
class API
|
@@ -12,6 +13,7 @@ module BrazeRuby
|
|
12
13
|
include BrazeRuby::Endpoints::SendMessages
|
13
14
|
include BrazeRuby::Endpoints::ScheduleMessages
|
14
15
|
include BrazeRuby::Endpoints::EmailStatus
|
16
|
+
include BrazeRuby::Endpoints::DeleteUsers
|
15
17
|
|
16
18
|
def export_users(**payload)
|
17
19
|
BrazeRuby::REST::ExportUsers.new(braze_url).perform(api_key, payload)
|
data/lib/braze_ruby/endpoints.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module BrazeRuby
|
2
|
+
module Endpoints
|
3
|
+
module DeleteUsers
|
4
|
+
attr_writer :delete_users_service
|
5
|
+
|
6
|
+
def delete_users_action(**payload)
|
7
|
+
delete_users_service.perform(api_key, payload)
|
8
|
+
end
|
9
|
+
|
10
|
+
def delete_users(payload)
|
11
|
+
delete_users_action(external_ids: payload.compact.uniq)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def delete_users_service
|
17
|
+
@delete_users_service ||= BrazeRuby::REST::DeleteUsers.new(braze_url)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/braze_ruby/rest.rb
CHANGED
data/lib/braze_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braze_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Nussbaum
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-05-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: virtus
|
@@ -200,6 +200,7 @@ files:
|
|
200
200
|
- lib/braze_ruby/api.rb
|
201
201
|
- lib/braze_ruby/deprecated.rb
|
202
202
|
- lib/braze_ruby/endpoints.rb
|
203
|
+
- lib/braze_ruby/endpoints/delete_users.rb
|
203
204
|
- lib/braze_ruby/endpoints/email_status.rb
|
204
205
|
- lib/braze_ruby/endpoints/schedule_messages.rb
|
205
206
|
- lib/braze_ruby/endpoints/send_messages.rb
|
@@ -207,6 +208,7 @@ files:
|
|
207
208
|
- lib/braze_ruby/http.rb
|
208
209
|
- lib/braze_ruby/rest.rb
|
209
210
|
- lib/braze_ruby/rest/base.rb
|
211
|
+
- lib/braze_ruby/rest/delete_users.rb
|
210
212
|
- lib/braze_ruby/rest/email_status.rb
|
211
213
|
- lib/braze_ruby/rest/export_users.rb
|
212
214
|
- lib/braze_ruby/rest/list_segments.rb
|