adzerk_decision_sdk 1.0.0.pre.beta.1
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 +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +70 -0
- data/README.md +97 -0
- data/Rakefile +10 -0
- data/adzerk_decision_sdk.gemspec +39 -0
- data/docs/Consent.md +17 -0
- data/docs/ConsentRequest.md +19 -0
- data/docs/Content.md +25 -0
- data/docs/Decision.md +35 -0
- data/docs/DecisionApi.md +57 -0
- data/docs/DecisionData.md +25 -0
- data/docs/DecisionRequest.md +43 -0
- data/docs/DecisionResponse.md +21 -0
- data/docs/Event.md +19 -0
- data/docs/GdprConsent.md +19 -0
- data/docs/Placement.md +47 -0
- data/docs/PricingData.md +25 -0
- data/docs/Request.md +43 -0
- data/docs/RequestConsent.md +17 -0
- data/docs/Response.md +21 -0
- data/docs/User.md +17 -0
- data/docs/UserdbApi.md +536 -0
- data/git_push.sh +58 -0
- data/lib/adzerk_decision_sdk/api/decision_api.rb +80 -0
- data/lib/adzerk_decision_sdk/api/userdb_api.rb +731 -0
- data/lib/adzerk_decision_sdk/api_client.rb +386 -0
- data/lib/adzerk_decision_sdk/api_error.rb +57 -0
- data/lib/adzerk_decision_sdk/client.rb +43 -0
- data/lib/adzerk_decision_sdk/configuration.rb +262 -0
- data/lib/adzerk_decision_sdk/decision_client.rb +73 -0
- data/lib/adzerk_decision_sdk/event_type.rb +61 -0
- data/lib/adzerk_decision_sdk/models/consent_request.rb +215 -0
- data/lib/adzerk_decision_sdk/models/content.rb +242 -0
- data/lib/adzerk_decision_sdk/models/decision.rb +291 -0
- data/lib/adzerk_decision_sdk/models/decision_data.rb +242 -0
- data/lib/adzerk_decision_sdk/models/decision_request.rb +359 -0
- data/lib/adzerk_decision_sdk/models/decision_response.rb +224 -0
- data/lib/adzerk_decision_sdk/models/event.rb +215 -0
- data/lib/adzerk_decision_sdk/models/placement.rb +377 -0
- data/lib/adzerk_decision_sdk/models/pricing_data.rb +242 -0
- data/lib/adzerk_decision_sdk/models/user.rb +208 -0
- data/lib/adzerk_decision_sdk/pixel_client.rb +26 -0
- data/lib/adzerk_decision_sdk/rate_type.rb +8 -0
- data/lib/adzerk_decision_sdk/user_db_client.rb +64 -0
- data/lib/adzerk_decision_sdk/version.rb +15 -0
- data/lib/adzerk_decision_sdk.rb +58 -0
- data/pkg/adzerk_decision_sdk-1.0.0.gem +0 -0
- data/spec/.gitkeep +0 -0
- data/spec/placeholder_spec.rb +9 -0
- metadata +153 -0
@@ -0,0 +1,731 @@
|
|
1
|
+
=begin
|
2
|
+
#Adzerk Decision API
|
3
|
+
|
4
|
+
#Adzerk Decision API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module AdzerkDecisionSdk
|
16
|
+
class UserdbApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Add Custom Properties to a User
|
23
|
+
# @param network_id [Integer] Your Network Id
|
24
|
+
# @param user_key [String] The User's UserDB Key
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Object] :body
|
27
|
+
# @return [File]
|
28
|
+
def add_custom_properties(network_id, user_key, opts = {})
|
29
|
+
data, _status_code, _headers = add_custom_properties_with_http_info(network_id, user_key, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Add Custom Properties to a User
|
34
|
+
# @param network_id [Integer] Your Network Id
|
35
|
+
# @param user_key [String] The User's UserDB Key
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [Object] :body
|
38
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
39
|
+
def add_custom_properties_with_http_info(network_id, user_key, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.add_custom_properties ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'network_id' is set
|
44
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.add_custom_properties"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'user_key' is set
|
48
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.add_custom_properties"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/udb/{networkId}/custom'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
query_params[:'userKey'] = user_key
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[:header_params] || {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
62
|
+
# HTTP header 'Content-Type'
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = opts[:form_params] || {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
70
|
+
|
71
|
+
# return_type
|
72
|
+
return_type = opts[:return_type] || 'File'
|
73
|
+
|
74
|
+
# auth_names
|
75
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
76
|
+
|
77
|
+
new_options = opts.merge(
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: UserdbApi#add_custom_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
93
|
+
# Add Interests to a User
|
94
|
+
# @param network_id [Integer] Your Network Id
|
95
|
+
# @param user_key [String] The User's UserDB Key
|
96
|
+
# @param interest [String] Comma Seperated list of interests
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [File]
|
99
|
+
def add_interests(network_id, user_key, interest, opts = {})
|
100
|
+
data, _status_code, _headers = add_interests_with_http_info(network_id, user_key, interest, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Add Interests to a User
|
105
|
+
# @param network_id [Integer] Your Network Id
|
106
|
+
# @param user_key [String] The User's UserDB Key
|
107
|
+
# @param interest [String] Comma Seperated list of interests
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
110
|
+
def add_interests_with_http_info(network_id, user_key, interest, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.add_interests ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'network_id' is set
|
115
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.add_interests"
|
117
|
+
end
|
118
|
+
# verify the required parameter 'user_key' is set
|
119
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.add_interests"
|
121
|
+
end
|
122
|
+
# verify the required parameter 'interest' is set
|
123
|
+
if @api_client.config.client_side_validation && interest.nil?
|
124
|
+
fail ArgumentError, "Missing the required parameter 'interest' when calling UserdbApi.add_interests"
|
125
|
+
end
|
126
|
+
# resource path
|
127
|
+
local_var_path = '/udb/{networkId}/interest/i.gif'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
128
|
+
|
129
|
+
# query parameters
|
130
|
+
query_params = opts[:query_params] || {}
|
131
|
+
query_params[:'userKey'] = user_key
|
132
|
+
query_params[:'interest'] = interest
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = opts[:header_params] || {}
|
136
|
+
# HTTP header 'Accept' (if needed)
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = opts[:form_params] || {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = opts[:body]
|
144
|
+
|
145
|
+
# return_type
|
146
|
+
return_type = opts[:return_type] || 'File'
|
147
|
+
|
148
|
+
# auth_names
|
149
|
+
auth_names = opts[:auth_names] || []
|
150
|
+
|
151
|
+
new_options = opts.merge(
|
152
|
+
:header_params => header_params,
|
153
|
+
:query_params => query_params,
|
154
|
+
:form_params => form_params,
|
155
|
+
:body => post_body,
|
156
|
+
:auth_names => auth_names,
|
157
|
+
:return_type => return_type
|
158
|
+
)
|
159
|
+
|
160
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
161
|
+
if @api_client.config.debugging
|
162
|
+
@api_client.config.logger.debug "API called: UserdbApi#add_interests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
163
|
+
end
|
164
|
+
return data, status_code, headers
|
165
|
+
end
|
166
|
+
|
167
|
+
# Add User to a Retargeting Segment
|
168
|
+
# @param network_id [Integer] Your Network Id
|
169
|
+
# @param advertiser_id [Integer] The Advertiser's ID
|
170
|
+
# @param retargeting_segment_id [Integer] The Segment's ID
|
171
|
+
# @param user_key [String] The User's UserDB Key
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @return [File]
|
174
|
+
def add_retargeting_segment(network_id, advertiser_id, retargeting_segment_id, user_key, opts = {})
|
175
|
+
data, _status_code, _headers = add_retargeting_segment_with_http_info(network_id, advertiser_id, retargeting_segment_id, user_key, opts)
|
176
|
+
data
|
177
|
+
end
|
178
|
+
|
179
|
+
# Add User to a Retargeting Segment
|
180
|
+
# @param network_id [Integer] Your Network Id
|
181
|
+
# @param advertiser_id [Integer] The Advertiser's ID
|
182
|
+
# @param retargeting_segment_id [Integer] The Segment's ID
|
183
|
+
# @param user_key [String] The User's UserDB Key
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
186
|
+
def add_retargeting_segment_with_http_info(network_id, advertiser_id, retargeting_segment_id, user_key, opts = {})
|
187
|
+
if @api_client.config.debugging
|
188
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.add_retargeting_segment ...'
|
189
|
+
end
|
190
|
+
# verify the required parameter 'network_id' is set
|
191
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
192
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.add_retargeting_segment"
|
193
|
+
end
|
194
|
+
# verify the required parameter 'advertiser_id' is set
|
195
|
+
if @api_client.config.client_side_validation && advertiser_id.nil?
|
196
|
+
fail ArgumentError, "Missing the required parameter 'advertiser_id' when calling UserdbApi.add_retargeting_segment"
|
197
|
+
end
|
198
|
+
# verify the required parameter 'retargeting_segment_id' is set
|
199
|
+
if @api_client.config.client_side_validation && retargeting_segment_id.nil?
|
200
|
+
fail ArgumentError, "Missing the required parameter 'retargeting_segment_id' when calling UserdbApi.add_retargeting_segment"
|
201
|
+
end
|
202
|
+
# verify the required parameter 'user_key' is set
|
203
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
204
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.add_retargeting_segment"
|
205
|
+
end
|
206
|
+
# resource path
|
207
|
+
local_var_path = '/udb/{networkId}/rt/{advertiserId}/{retargetingSegmentId}/i.gif'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s)).sub('{' + 'advertiserId' + '}', CGI.escape(advertiser_id.to_s)).sub('{' + 'retargetingSegmentId' + '}', CGI.escape(retargeting_segment_id.to_s))
|
208
|
+
|
209
|
+
# query parameters
|
210
|
+
query_params = opts[:query_params] || {}
|
211
|
+
query_params[:'userKey'] = user_key
|
212
|
+
|
213
|
+
# header parameters
|
214
|
+
header_params = opts[:header_params] || {}
|
215
|
+
# HTTP header 'Accept' (if needed)
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
217
|
+
|
218
|
+
# form parameters
|
219
|
+
form_params = opts[:form_params] || {}
|
220
|
+
|
221
|
+
# http body (model)
|
222
|
+
post_body = opts[:body]
|
223
|
+
|
224
|
+
# return_type
|
225
|
+
return_type = opts[:return_type] || 'File'
|
226
|
+
|
227
|
+
# auth_names
|
228
|
+
auth_names = opts[:auth_names] || []
|
229
|
+
|
230
|
+
new_options = opts.merge(
|
231
|
+
:header_params => header_params,
|
232
|
+
:query_params => query_params,
|
233
|
+
:form_params => form_params,
|
234
|
+
:body => post_body,
|
235
|
+
:auth_names => auth_names,
|
236
|
+
:return_type => return_type
|
237
|
+
)
|
238
|
+
|
239
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
240
|
+
if @api_client.config.debugging
|
241
|
+
@api_client.config.logger.debug "API called: UserdbApi#add_retargeting_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
242
|
+
end
|
243
|
+
return data, status_code, headers
|
244
|
+
end
|
245
|
+
|
246
|
+
# Forget User
|
247
|
+
# @param network_id [Integer] Your Network Id
|
248
|
+
# @param user_key [String] The User's UserDB Key
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @return [nil]
|
251
|
+
def forget(network_id, user_key, opts = {})
|
252
|
+
forget_with_http_info(network_id, user_key, opts)
|
253
|
+
nil
|
254
|
+
end
|
255
|
+
|
256
|
+
# Forget User
|
257
|
+
# @param network_id [Integer] Your Network Id
|
258
|
+
# @param user_key [String] The User's UserDB Key
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
261
|
+
def forget_with_http_info(network_id, user_key, opts = {})
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.forget ...'
|
264
|
+
end
|
265
|
+
# verify the required parameter 'network_id' is set
|
266
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
267
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.forget"
|
268
|
+
end
|
269
|
+
# verify the required parameter 'user_key' is set
|
270
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
271
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.forget"
|
272
|
+
end
|
273
|
+
# resource path
|
274
|
+
local_var_path = '/udb/{networkId}'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
275
|
+
|
276
|
+
# query parameters
|
277
|
+
query_params = opts[:query_params] || {}
|
278
|
+
query_params[:'userKey'] = user_key
|
279
|
+
|
280
|
+
# header parameters
|
281
|
+
header_params = opts[:header_params] || {}
|
282
|
+
|
283
|
+
# form parameters
|
284
|
+
form_params = opts[:form_params] || {}
|
285
|
+
|
286
|
+
# http body (model)
|
287
|
+
post_body = opts[:body]
|
288
|
+
|
289
|
+
# return_type
|
290
|
+
return_type = opts[:return_type]
|
291
|
+
|
292
|
+
# auth_names
|
293
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
294
|
+
|
295
|
+
new_options = opts.merge(
|
296
|
+
:header_params => header_params,
|
297
|
+
:query_params => query_params,
|
298
|
+
:form_params => form_params,
|
299
|
+
:body => post_body,
|
300
|
+
:auth_names => auth_names,
|
301
|
+
:return_type => return_type
|
302
|
+
)
|
303
|
+
|
304
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug "API called: UserdbApi#forget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
307
|
+
end
|
308
|
+
return data, status_code, headers
|
309
|
+
end
|
310
|
+
|
311
|
+
# GDPR Consent
|
312
|
+
# @param network_id [Integer] Your Network Id
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @option opts [ConsentRequest] :consent_request
|
315
|
+
# @return [File]
|
316
|
+
def gdpr_consent(network_id, opts = {})
|
317
|
+
data, _status_code, _headers = gdpr_consent_with_http_info(network_id, opts)
|
318
|
+
data
|
319
|
+
end
|
320
|
+
|
321
|
+
# GDPR Consent
|
322
|
+
# @param network_id [Integer] Your Network Id
|
323
|
+
# @param [Hash] opts the optional parameters
|
324
|
+
# @option opts [ConsentRequest] :consent_request
|
325
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
326
|
+
def gdpr_consent_with_http_info(network_id, opts = {})
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.gdpr_consent ...'
|
329
|
+
end
|
330
|
+
# verify the required parameter 'network_id' is set
|
331
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
332
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.gdpr_consent"
|
333
|
+
end
|
334
|
+
# resource path
|
335
|
+
local_var_path = '/udb/{networkId}/consent'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
336
|
+
|
337
|
+
# query parameters
|
338
|
+
query_params = opts[:query_params] || {}
|
339
|
+
|
340
|
+
# header parameters
|
341
|
+
header_params = opts[:header_params] || {}
|
342
|
+
# HTTP header 'Accept' (if needed)
|
343
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
344
|
+
# HTTP header 'Content-Type'
|
345
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
346
|
+
|
347
|
+
# form parameters
|
348
|
+
form_params = opts[:form_params] || {}
|
349
|
+
|
350
|
+
# http body (model)
|
351
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'consent_request'])
|
352
|
+
|
353
|
+
# return_type
|
354
|
+
return_type = opts[:return_type] || 'File'
|
355
|
+
|
356
|
+
# auth_names
|
357
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
358
|
+
|
359
|
+
new_options = opts.merge(
|
360
|
+
:header_params => header_params,
|
361
|
+
:query_params => query_params,
|
362
|
+
:form_params => form_params,
|
363
|
+
:body => post_body,
|
364
|
+
:auth_names => auth_names,
|
365
|
+
:return_type => return_type
|
366
|
+
)
|
367
|
+
|
368
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug "API called: UserdbApi#gdpr_consent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
371
|
+
end
|
372
|
+
return data, status_code, headers
|
373
|
+
end
|
374
|
+
|
375
|
+
# IP Address Override
|
376
|
+
# @param network_id [Integer] Your Network Id
|
377
|
+
# @param user_key [String] The User's UserDB Key
|
378
|
+
# @param ip [String] This is the IP to exclude
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @return [File]
|
381
|
+
def ip_override(network_id, user_key, ip, opts = {})
|
382
|
+
data, _status_code, _headers = ip_override_with_http_info(network_id, user_key, ip, opts)
|
383
|
+
data
|
384
|
+
end
|
385
|
+
|
386
|
+
# IP Address Override
|
387
|
+
# @param network_id [Integer] Your Network Id
|
388
|
+
# @param user_key [String] The User's UserDB Key
|
389
|
+
# @param ip [String] This is the IP to exclude
|
390
|
+
# @param [Hash] opts the optional parameters
|
391
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
392
|
+
def ip_override_with_http_info(network_id, user_key, ip, opts = {})
|
393
|
+
if @api_client.config.debugging
|
394
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.ip_override ...'
|
395
|
+
end
|
396
|
+
# verify the required parameter 'network_id' is set
|
397
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
398
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.ip_override"
|
399
|
+
end
|
400
|
+
# verify the required parameter 'user_key' is set
|
401
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
402
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.ip_override"
|
403
|
+
end
|
404
|
+
# verify the required parameter 'ip' is set
|
405
|
+
if @api_client.config.client_side_validation && ip.nil?
|
406
|
+
fail ArgumentError, "Missing the required parameter 'ip' when calling UserdbApi.ip_override"
|
407
|
+
end
|
408
|
+
# resource path
|
409
|
+
local_var_path = '/udb/{networkId}/ip/i.gif'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
410
|
+
|
411
|
+
# query parameters
|
412
|
+
query_params = opts[:query_params] || {}
|
413
|
+
query_params[:'userKey'] = user_key
|
414
|
+
query_params[:'ip'] = ip
|
415
|
+
|
416
|
+
# header parameters
|
417
|
+
header_params = opts[:header_params] || {}
|
418
|
+
# HTTP header 'Accept' (if needed)
|
419
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
420
|
+
|
421
|
+
# form parameters
|
422
|
+
form_params = opts[:form_params] || {}
|
423
|
+
|
424
|
+
# http body (model)
|
425
|
+
post_body = opts[:body]
|
426
|
+
|
427
|
+
# return_type
|
428
|
+
return_type = opts[:return_type] || 'File'
|
429
|
+
|
430
|
+
# auth_names
|
431
|
+
auth_names = opts[:auth_names] || []
|
432
|
+
|
433
|
+
new_options = opts.merge(
|
434
|
+
:header_params => header_params,
|
435
|
+
:query_params => query_params,
|
436
|
+
:form_params => form_params,
|
437
|
+
:body => post_body,
|
438
|
+
:auth_names => auth_names,
|
439
|
+
:return_type => return_type
|
440
|
+
)
|
441
|
+
|
442
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
443
|
+
if @api_client.config.debugging
|
444
|
+
@api_client.config.logger.debug "API called: UserdbApi#ip_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
445
|
+
end
|
446
|
+
return data, status_code, headers
|
447
|
+
end
|
448
|
+
|
449
|
+
# User Matching
|
450
|
+
# @param network_id [Integer] Your Network Id
|
451
|
+
# @param user_key [String] The User's UserDB Key
|
452
|
+
# @param partner_id [Integer] The ID of the RTB provider in Adzerk. Contact Support if you don't have the ID.
|
453
|
+
# @param user_id [Integer] This is the UserID the individual RTB provider has of the user. This is NOT the UserDB userkey.
|
454
|
+
# @param [Hash] opts the optional parameters
|
455
|
+
# @return [File]
|
456
|
+
def match_user(network_id, user_key, partner_id, user_id, opts = {})
|
457
|
+
data, _status_code, _headers = match_user_with_http_info(network_id, user_key, partner_id, user_id, opts)
|
458
|
+
data
|
459
|
+
end
|
460
|
+
|
461
|
+
# User Matching
|
462
|
+
# @param network_id [Integer] Your Network Id
|
463
|
+
# @param user_key [String] The User's UserDB Key
|
464
|
+
# @param partner_id [Integer] The ID of the RTB provider in Adzerk. Contact Support if you don't have the ID.
|
465
|
+
# @param user_id [Integer] This is the UserID the individual RTB provider has of the user. This is NOT the UserDB userkey.
|
466
|
+
# @param [Hash] opts the optional parameters
|
467
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
468
|
+
def match_user_with_http_info(network_id, user_key, partner_id, user_id, opts = {})
|
469
|
+
if @api_client.config.debugging
|
470
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.match_user ...'
|
471
|
+
end
|
472
|
+
# verify the required parameter 'network_id' is set
|
473
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
474
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.match_user"
|
475
|
+
end
|
476
|
+
# verify the required parameter 'user_key' is set
|
477
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
478
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.match_user"
|
479
|
+
end
|
480
|
+
# verify the required parameter 'partner_id' is set
|
481
|
+
if @api_client.config.client_side_validation && partner_id.nil?
|
482
|
+
fail ArgumentError, "Missing the required parameter 'partner_id' when calling UserdbApi.match_user"
|
483
|
+
end
|
484
|
+
# verify the required parameter 'user_id' is set
|
485
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
486
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UserdbApi.match_user"
|
487
|
+
end
|
488
|
+
# resource path
|
489
|
+
local_var_path = '/udb/{networkId}/sync/i.gif'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
490
|
+
|
491
|
+
# query parameters
|
492
|
+
query_params = opts[:query_params] || {}
|
493
|
+
query_params[:'userKey'] = user_key
|
494
|
+
query_params[:'partnerId'] = partner_id
|
495
|
+
query_params[:'userId'] = user_id
|
496
|
+
|
497
|
+
# header parameters
|
498
|
+
header_params = opts[:header_params] || {}
|
499
|
+
# HTTP header 'Accept' (if needed)
|
500
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
501
|
+
|
502
|
+
# form parameters
|
503
|
+
form_params = opts[:form_params] || {}
|
504
|
+
|
505
|
+
# http body (model)
|
506
|
+
post_body = opts[:body]
|
507
|
+
|
508
|
+
# return_type
|
509
|
+
return_type = opts[:return_type] || 'File'
|
510
|
+
|
511
|
+
# auth_names
|
512
|
+
auth_names = opts[:auth_names] || []
|
513
|
+
|
514
|
+
new_options = opts.merge(
|
515
|
+
:header_params => header_params,
|
516
|
+
:query_params => query_params,
|
517
|
+
:form_params => form_params,
|
518
|
+
:body => post_body,
|
519
|
+
:auth_names => auth_names,
|
520
|
+
:return_type => return_type
|
521
|
+
)
|
522
|
+
|
523
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
524
|
+
if @api_client.config.debugging
|
525
|
+
@api_client.config.logger.debug "API called: UserdbApi#match_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
526
|
+
end
|
527
|
+
return data, status_code, headers
|
528
|
+
end
|
529
|
+
|
530
|
+
# Opt-Out a User
|
531
|
+
# @param network_id [Integer] Your Network Id
|
532
|
+
# @param user_key [String] The User's UserDB Key
|
533
|
+
# @param [Hash] opts the optional parameters
|
534
|
+
# @return [File]
|
535
|
+
def opt_out(network_id, user_key, opts = {})
|
536
|
+
data, _status_code, _headers = opt_out_with_http_info(network_id, user_key, opts)
|
537
|
+
data
|
538
|
+
end
|
539
|
+
|
540
|
+
# Opt-Out a User
|
541
|
+
# @param network_id [Integer] Your Network Id
|
542
|
+
# @param user_key [String] The User's UserDB Key
|
543
|
+
# @param [Hash] opts the optional parameters
|
544
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
545
|
+
def opt_out_with_http_info(network_id, user_key, opts = {})
|
546
|
+
if @api_client.config.debugging
|
547
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.opt_out ...'
|
548
|
+
end
|
549
|
+
# verify the required parameter 'network_id' is set
|
550
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
551
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.opt_out"
|
552
|
+
end
|
553
|
+
# verify the required parameter 'user_key' is set
|
554
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
555
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.opt_out"
|
556
|
+
end
|
557
|
+
# resource path
|
558
|
+
local_var_path = '/udb/{networkId}/optout/i.gif'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
559
|
+
|
560
|
+
# query parameters
|
561
|
+
query_params = opts[:query_params] || {}
|
562
|
+
query_params[:'userKey'] = user_key
|
563
|
+
|
564
|
+
# header parameters
|
565
|
+
header_params = opts[:header_params] || {}
|
566
|
+
# HTTP header 'Accept' (if needed)
|
567
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
568
|
+
|
569
|
+
# form parameters
|
570
|
+
form_params = opts[:form_params] || {}
|
571
|
+
|
572
|
+
# http body (model)
|
573
|
+
post_body = opts[:body]
|
574
|
+
|
575
|
+
# return_type
|
576
|
+
return_type = opts[:return_type] || 'File'
|
577
|
+
|
578
|
+
# auth_names
|
579
|
+
auth_names = opts[:auth_names] || []
|
580
|
+
|
581
|
+
new_options = opts.merge(
|
582
|
+
:header_params => header_params,
|
583
|
+
:query_params => query_params,
|
584
|
+
:form_params => form_params,
|
585
|
+
:body => post_body,
|
586
|
+
:auth_names => auth_names,
|
587
|
+
:return_type => return_type
|
588
|
+
)
|
589
|
+
|
590
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
591
|
+
if @api_client.config.debugging
|
592
|
+
@api_client.config.logger.debug "API called: UserdbApi#opt_out\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
593
|
+
end
|
594
|
+
return data, status_code, headers
|
595
|
+
end
|
596
|
+
|
597
|
+
# Read a User's UserDB Record
|
598
|
+
# @param network_id [Integer] Your Network Id
|
599
|
+
# @param user_key [String] The User's UserDB Key
|
600
|
+
# @param [Hash] opts the optional parameters
|
601
|
+
# @return [Object]
|
602
|
+
def read(network_id, user_key, opts = {})
|
603
|
+
data, _status_code, _headers = read_with_http_info(network_id, user_key, opts)
|
604
|
+
data
|
605
|
+
end
|
606
|
+
|
607
|
+
# Read a User's UserDB Record
|
608
|
+
# @param network_id [Integer] Your Network Id
|
609
|
+
# @param user_key [String] The User's UserDB Key
|
610
|
+
# @param [Hash] opts the optional parameters
|
611
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
612
|
+
def read_with_http_info(network_id, user_key, opts = {})
|
613
|
+
if @api_client.config.debugging
|
614
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.read ...'
|
615
|
+
end
|
616
|
+
# verify the required parameter 'network_id' is set
|
617
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
618
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.read"
|
619
|
+
end
|
620
|
+
# verify the required parameter 'user_key' is set
|
621
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
622
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.read"
|
623
|
+
end
|
624
|
+
# resource path
|
625
|
+
local_var_path = '/udb/{networkId}/read'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
626
|
+
|
627
|
+
# query parameters
|
628
|
+
query_params = opts[:query_params] || {}
|
629
|
+
query_params[:'userKey'] = user_key
|
630
|
+
|
631
|
+
# header parameters
|
632
|
+
header_params = opts[:header_params] || {}
|
633
|
+
# HTTP header 'Accept' (if needed)
|
634
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
635
|
+
|
636
|
+
# form parameters
|
637
|
+
form_params = opts[:form_params] || {}
|
638
|
+
|
639
|
+
# http body (model)
|
640
|
+
post_body = opts[:body]
|
641
|
+
|
642
|
+
# return_type
|
643
|
+
return_type = opts[:return_type] || 'Object'
|
644
|
+
|
645
|
+
# auth_names
|
646
|
+
auth_names = opts[:auth_names] || []
|
647
|
+
|
648
|
+
new_options = opts.merge(
|
649
|
+
:header_params => header_params,
|
650
|
+
:query_params => query_params,
|
651
|
+
:form_params => form_params,
|
652
|
+
:body => post_body,
|
653
|
+
:auth_names => auth_names,
|
654
|
+
:return_type => return_type
|
655
|
+
)
|
656
|
+
|
657
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
658
|
+
if @api_client.config.debugging
|
659
|
+
@api_client.config.logger.debug "API called: UserdbApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
660
|
+
end
|
661
|
+
return data, status_code, headers
|
662
|
+
end
|
663
|
+
|
664
|
+
# Set User Cookie
|
665
|
+
# @param network_id [Integer] Your Network Id
|
666
|
+
# @param user_key [String] UserDB Id for the user
|
667
|
+
# @param [Hash] opts the optional parameters
|
668
|
+
# @return [File]
|
669
|
+
def set_user_cookie(network_id, user_key, opts = {})
|
670
|
+
data, _status_code, _headers = set_user_cookie_with_http_info(network_id, user_key, opts)
|
671
|
+
data
|
672
|
+
end
|
673
|
+
|
674
|
+
# Set User Cookie
|
675
|
+
# @param network_id [Integer] Your Network Id
|
676
|
+
# @param user_key [String] UserDB Id for the user
|
677
|
+
# @param [Hash] opts the optional parameters
|
678
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
679
|
+
def set_user_cookie_with_http_info(network_id, user_key, opts = {})
|
680
|
+
if @api_client.config.debugging
|
681
|
+
@api_client.config.logger.debug 'Calling API: UserdbApi.set_user_cookie ...'
|
682
|
+
end
|
683
|
+
# verify the required parameter 'network_id' is set
|
684
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
685
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling UserdbApi.set_user_cookie"
|
686
|
+
end
|
687
|
+
# verify the required parameter 'user_key' is set
|
688
|
+
if @api_client.config.client_side_validation && user_key.nil?
|
689
|
+
fail ArgumentError, "Missing the required parameter 'user_key' when calling UserdbApi.set_user_cookie"
|
690
|
+
end
|
691
|
+
# resource path
|
692
|
+
local_var_path = '/udb/{networkId}/set/i.gif'.sub('{' + 'networkId' + '}', CGI.escape(network_id.to_s))
|
693
|
+
|
694
|
+
# query parameters
|
695
|
+
query_params = opts[:query_params] || {}
|
696
|
+
query_params[:'userKey'] = user_key
|
697
|
+
|
698
|
+
# header parameters
|
699
|
+
header_params = opts[:header_params] || {}
|
700
|
+
# HTTP header 'Accept' (if needed)
|
701
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
|
702
|
+
|
703
|
+
# form parameters
|
704
|
+
form_params = opts[:form_params] || {}
|
705
|
+
|
706
|
+
# http body (model)
|
707
|
+
post_body = opts[:body]
|
708
|
+
|
709
|
+
# return_type
|
710
|
+
return_type = opts[:return_type] || 'File'
|
711
|
+
|
712
|
+
# auth_names
|
713
|
+
auth_names = opts[:auth_names] || []
|
714
|
+
|
715
|
+
new_options = opts.merge(
|
716
|
+
:header_params => header_params,
|
717
|
+
:query_params => query_params,
|
718
|
+
:form_params => form_params,
|
719
|
+
:body => post_body,
|
720
|
+
:auth_names => auth_names,
|
721
|
+
:return_type => return_type
|
722
|
+
)
|
723
|
+
|
724
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
725
|
+
if @api_client.config.debugging
|
726
|
+
@api_client.config.logger.debug "API called: UserdbApi#set_user_cookie\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
727
|
+
end
|
728
|
+
return data, status_code, headers
|
729
|
+
end
|
730
|
+
end
|
731
|
+
end
|