adzerk_decision_sdk 1.0.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/docs/Response.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# AdzerkDecisionSdk::Response
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**user** | [**User**](User.md) | | [optional]
|
8
|
+
**decisions** | [**Object**](.md) | | [optional]
|
9
|
+
**explain** | [**Object**](.md) | | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'AdzerkDecisionSdk'
|
15
|
+
|
16
|
+
instance = AdzerkDecisionSdk::Response.new(user: null,
|
17
|
+
decisions: null,
|
18
|
+
explain: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/User.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# AdzerkDecisionSdk::User
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**key** | **String** | The UserKey used for UserDB Targeting | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'AdzerkDecisionSdk'
|
13
|
+
|
14
|
+
instance = AdzerkDecisionSdk::User.new(key: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/UserdbApi.md
ADDED
@@ -0,0 +1,536 @@
|
|
1
|
+
# AdzerkDecisionSdk::UserdbApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://e-23.adzerk.net*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**add_custom_properties**](UserdbApi.md#add_custom_properties) | **POST** /udb/{networkId}/custom |
|
8
|
+
[**add_interests**](UserdbApi.md#add_interests) | **GET** /udb/{networkId}/interest/i.gif |
|
9
|
+
[**add_retargeting_segment**](UserdbApi.md#add_retargeting_segment) | **GET** /udb/{networkId}/rt/{advertiserId}/{retargetingSegmentId}/i.gif |
|
10
|
+
[**forget**](UserdbApi.md#forget) | **DELETE** /udb/{networkId} |
|
11
|
+
[**gdpr_consent**](UserdbApi.md#gdpr_consent) | **POST** /udb/{networkId}/consent |
|
12
|
+
[**ip_override**](UserdbApi.md#ip_override) | **GET** /udb/{networkId}/ip/i.gif |
|
13
|
+
[**match_user**](UserdbApi.md#match_user) | **GET** /udb/{networkId}/sync/i.gif |
|
14
|
+
[**opt_out**](UserdbApi.md#opt_out) | **GET** /udb/{networkId}/optout/i.gif |
|
15
|
+
[**read**](UserdbApi.md#read) | **GET** /udb/{networkId}/read |
|
16
|
+
[**set_user_cookie**](UserdbApi.md#set_user_cookie) | **GET** /udb/{networkId}/set/i.gif |
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
## add_custom_properties
|
21
|
+
|
22
|
+
> File add_custom_properties(network_id, user_key, opts)
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
Add Custom Properties to a User
|
27
|
+
|
28
|
+
### Example
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
# load the gem
|
32
|
+
require 'adzerk_decision_sdk'
|
33
|
+
# setup authorization
|
34
|
+
AdzerkDecisionSdk.configure do |config|
|
35
|
+
# Configure API key authorization: ApiKeyAuth
|
36
|
+
config.api_key['X-Adzerk-ApiKey'] = 'YOUR API KEY'
|
37
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
38
|
+
#config.api_key_prefix['X-Adzerk-ApiKey'] = 'Bearer'
|
39
|
+
end
|
40
|
+
|
41
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
42
|
+
network_id = 56 # Integer | Your Network Id
|
43
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
44
|
+
opts = {
|
45
|
+
body: nil # Object |
|
46
|
+
}
|
47
|
+
|
48
|
+
begin
|
49
|
+
result = api_instance.add_custom_properties(network_id, user_key, opts)
|
50
|
+
p result
|
51
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
52
|
+
puts "Exception when calling UserdbApi->add_custom_properties: #{e}"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
### Parameters
|
57
|
+
|
58
|
+
|
59
|
+
Name | Type | Description | Notes
|
60
|
+
------------- | ------------- | ------------- | -------------
|
61
|
+
**network_id** | **Integer**| Your Network Id |
|
62
|
+
**user_key** | **String**| The User's UserDB Key |
|
63
|
+
**body** | **Object**| | [optional]
|
64
|
+
|
65
|
+
### Return type
|
66
|
+
|
67
|
+
**File**
|
68
|
+
|
69
|
+
### Authorization
|
70
|
+
|
71
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
72
|
+
|
73
|
+
### HTTP request headers
|
74
|
+
|
75
|
+
- **Content-Type**: application/json
|
76
|
+
- **Accept**: image/gif
|
77
|
+
|
78
|
+
|
79
|
+
## add_interests
|
80
|
+
|
81
|
+
> File add_interests(network_id, user_key, interest)
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
Add Interests to a User
|
86
|
+
|
87
|
+
### Example
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
# load the gem
|
91
|
+
require 'adzerk_decision_sdk'
|
92
|
+
|
93
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
94
|
+
network_id = 56 # Integer | Your Network Id
|
95
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
96
|
+
interest = 'interest_example' # String | Comma Seperated list of interests
|
97
|
+
|
98
|
+
begin
|
99
|
+
result = api_instance.add_interests(network_id, user_key, interest)
|
100
|
+
p result
|
101
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
102
|
+
puts "Exception when calling UserdbApi->add_interests: #{e}"
|
103
|
+
end
|
104
|
+
```
|
105
|
+
|
106
|
+
### Parameters
|
107
|
+
|
108
|
+
|
109
|
+
Name | Type | Description | Notes
|
110
|
+
------------- | ------------- | ------------- | -------------
|
111
|
+
**network_id** | **Integer**| Your Network Id |
|
112
|
+
**user_key** | **String**| The User's UserDB Key |
|
113
|
+
**interest** | **String**| Comma Seperated list of interests |
|
114
|
+
|
115
|
+
### Return type
|
116
|
+
|
117
|
+
**File**
|
118
|
+
|
119
|
+
### Authorization
|
120
|
+
|
121
|
+
No authorization required
|
122
|
+
|
123
|
+
### HTTP request headers
|
124
|
+
|
125
|
+
- **Content-Type**: Not defined
|
126
|
+
- **Accept**: image/gif
|
127
|
+
|
128
|
+
|
129
|
+
## add_retargeting_segment
|
130
|
+
|
131
|
+
> File add_retargeting_segment(network_id, advertiser_id, retargeting_segment_id, user_key)
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
Add User to a Retargeting Segment
|
136
|
+
|
137
|
+
### Example
|
138
|
+
|
139
|
+
```ruby
|
140
|
+
# load the gem
|
141
|
+
require 'adzerk_decision_sdk'
|
142
|
+
|
143
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
144
|
+
network_id = 56 # Integer | Your Network Id
|
145
|
+
advertiser_id = 56 # Integer | The Advertiser's ID
|
146
|
+
retargeting_segment_id = 56 # Integer | The Segment's ID
|
147
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
148
|
+
|
149
|
+
begin
|
150
|
+
result = api_instance.add_retargeting_segment(network_id, advertiser_id, retargeting_segment_id, user_key)
|
151
|
+
p result
|
152
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
153
|
+
puts "Exception when calling UserdbApi->add_retargeting_segment: #{e}"
|
154
|
+
end
|
155
|
+
```
|
156
|
+
|
157
|
+
### Parameters
|
158
|
+
|
159
|
+
|
160
|
+
Name | Type | Description | Notes
|
161
|
+
------------- | ------------- | ------------- | -------------
|
162
|
+
**network_id** | **Integer**| Your Network Id |
|
163
|
+
**advertiser_id** | **Integer**| The Advertiser's ID |
|
164
|
+
**retargeting_segment_id** | **Integer**| The Segment's ID |
|
165
|
+
**user_key** | **String**| The User's UserDB Key |
|
166
|
+
|
167
|
+
### Return type
|
168
|
+
|
169
|
+
**File**
|
170
|
+
|
171
|
+
### Authorization
|
172
|
+
|
173
|
+
No authorization required
|
174
|
+
|
175
|
+
### HTTP request headers
|
176
|
+
|
177
|
+
- **Content-Type**: Not defined
|
178
|
+
- **Accept**: image/gif
|
179
|
+
|
180
|
+
|
181
|
+
## forget
|
182
|
+
|
183
|
+
> forget(network_id, user_key)
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
Forget User
|
188
|
+
|
189
|
+
### Example
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
# load the gem
|
193
|
+
require 'adzerk_decision_sdk'
|
194
|
+
# setup authorization
|
195
|
+
AdzerkDecisionSdk.configure do |config|
|
196
|
+
# Configure API key authorization: ApiKeyAuth
|
197
|
+
config.api_key['X-Adzerk-ApiKey'] = 'YOUR API KEY'
|
198
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
199
|
+
#config.api_key_prefix['X-Adzerk-ApiKey'] = 'Bearer'
|
200
|
+
end
|
201
|
+
|
202
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
203
|
+
network_id = 56 # Integer | Your Network Id
|
204
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
205
|
+
|
206
|
+
begin
|
207
|
+
api_instance.forget(network_id, user_key)
|
208
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
209
|
+
puts "Exception when calling UserdbApi->forget: #{e}"
|
210
|
+
end
|
211
|
+
```
|
212
|
+
|
213
|
+
### Parameters
|
214
|
+
|
215
|
+
|
216
|
+
Name | Type | Description | Notes
|
217
|
+
------------- | ------------- | ------------- | -------------
|
218
|
+
**network_id** | **Integer**| Your Network Id |
|
219
|
+
**user_key** | **String**| The User's UserDB Key |
|
220
|
+
|
221
|
+
### Return type
|
222
|
+
|
223
|
+
nil (empty response body)
|
224
|
+
|
225
|
+
### Authorization
|
226
|
+
|
227
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
228
|
+
|
229
|
+
### HTTP request headers
|
230
|
+
|
231
|
+
- **Content-Type**: Not defined
|
232
|
+
- **Accept**: Not defined
|
233
|
+
|
234
|
+
|
235
|
+
## gdpr_consent
|
236
|
+
|
237
|
+
> File gdpr_consent(network_id, opts)
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
GDPR Consent
|
242
|
+
|
243
|
+
### Example
|
244
|
+
|
245
|
+
```ruby
|
246
|
+
# load the gem
|
247
|
+
require 'adzerk_decision_sdk'
|
248
|
+
# setup authorization
|
249
|
+
AdzerkDecisionSdk.configure do |config|
|
250
|
+
# Configure API key authorization: ApiKeyAuth
|
251
|
+
config.api_key['X-Adzerk-ApiKey'] = 'YOUR API KEY'
|
252
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
253
|
+
#config.api_key_prefix['X-Adzerk-ApiKey'] = 'Bearer'
|
254
|
+
end
|
255
|
+
|
256
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
257
|
+
network_id = 56 # Integer | Your Network Id
|
258
|
+
opts = {
|
259
|
+
consent_request: AdzerkDecisionSdk::ConsentRequest.new # ConsentRequest |
|
260
|
+
}
|
261
|
+
|
262
|
+
begin
|
263
|
+
result = api_instance.gdpr_consent(network_id, opts)
|
264
|
+
p result
|
265
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
266
|
+
puts "Exception when calling UserdbApi->gdpr_consent: #{e}"
|
267
|
+
end
|
268
|
+
```
|
269
|
+
|
270
|
+
### Parameters
|
271
|
+
|
272
|
+
|
273
|
+
Name | Type | Description | Notes
|
274
|
+
------------- | ------------- | ------------- | -------------
|
275
|
+
**network_id** | **Integer**| Your Network Id |
|
276
|
+
**consent_request** | [**ConsentRequest**](ConsentRequest.md)| | [optional]
|
277
|
+
|
278
|
+
### Return type
|
279
|
+
|
280
|
+
**File**
|
281
|
+
|
282
|
+
### Authorization
|
283
|
+
|
284
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
285
|
+
|
286
|
+
### HTTP request headers
|
287
|
+
|
288
|
+
- **Content-Type**: application/json
|
289
|
+
- **Accept**: image/gif
|
290
|
+
|
291
|
+
|
292
|
+
## ip_override
|
293
|
+
|
294
|
+
> File ip_override(network_id, user_key, ip)
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
IP Address Override
|
299
|
+
|
300
|
+
### Example
|
301
|
+
|
302
|
+
```ruby
|
303
|
+
# load the gem
|
304
|
+
require 'adzerk_decision_sdk'
|
305
|
+
|
306
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
307
|
+
network_id = 56 # Integer | Your Network Id
|
308
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
309
|
+
ip = 'ip_example' # String | This is the IP to exclude
|
310
|
+
|
311
|
+
begin
|
312
|
+
result = api_instance.ip_override(network_id, user_key, ip)
|
313
|
+
p result
|
314
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
315
|
+
puts "Exception when calling UserdbApi->ip_override: #{e}"
|
316
|
+
end
|
317
|
+
```
|
318
|
+
|
319
|
+
### Parameters
|
320
|
+
|
321
|
+
|
322
|
+
Name | Type | Description | Notes
|
323
|
+
------------- | ------------- | ------------- | -------------
|
324
|
+
**network_id** | **Integer**| Your Network Id |
|
325
|
+
**user_key** | **String**| The User's UserDB Key |
|
326
|
+
**ip** | **String**| This is the IP to exclude |
|
327
|
+
|
328
|
+
### Return type
|
329
|
+
|
330
|
+
**File**
|
331
|
+
|
332
|
+
### Authorization
|
333
|
+
|
334
|
+
No authorization required
|
335
|
+
|
336
|
+
### HTTP request headers
|
337
|
+
|
338
|
+
- **Content-Type**: Not defined
|
339
|
+
- **Accept**: image/gif
|
340
|
+
|
341
|
+
|
342
|
+
## match_user
|
343
|
+
|
344
|
+
> File match_user(network_id, user_key, partner_id, user_id)
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
User Matching
|
349
|
+
|
350
|
+
### Example
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
# load the gem
|
354
|
+
require 'adzerk_decision_sdk'
|
355
|
+
|
356
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
357
|
+
network_id = 56 # Integer | Your Network Id
|
358
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
359
|
+
partner_id = 56 # Integer | The ID of the RTB provider in Adzerk. Contact Support if you don't have the ID.
|
360
|
+
user_id = 56 # Integer | This is the UserID the individual RTB provider has of the user. This is NOT the UserDB userkey.
|
361
|
+
|
362
|
+
begin
|
363
|
+
result = api_instance.match_user(network_id, user_key, partner_id, user_id)
|
364
|
+
p result
|
365
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
366
|
+
puts "Exception when calling UserdbApi->match_user: #{e}"
|
367
|
+
end
|
368
|
+
```
|
369
|
+
|
370
|
+
### Parameters
|
371
|
+
|
372
|
+
|
373
|
+
Name | Type | Description | Notes
|
374
|
+
------------- | ------------- | ------------- | -------------
|
375
|
+
**network_id** | **Integer**| Your Network Id |
|
376
|
+
**user_key** | **String**| The User's UserDB Key |
|
377
|
+
**partner_id** | **Integer**| The ID of the RTB provider in Adzerk. Contact Support if you don't have the ID. |
|
378
|
+
**user_id** | **Integer**| This is the UserID the individual RTB provider has of the user. This is NOT the UserDB userkey. |
|
379
|
+
|
380
|
+
### Return type
|
381
|
+
|
382
|
+
**File**
|
383
|
+
|
384
|
+
### Authorization
|
385
|
+
|
386
|
+
No authorization required
|
387
|
+
|
388
|
+
### HTTP request headers
|
389
|
+
|
390
|
+
- **Content-Type**: Not defined
|
391
|
+
- **Accept**: image/gif
|
392
|
+
|
393
|
+
|
394
|
+
## opt_out
|
395
|
+
|
396
|
+
> File opt_out(network_id, user_key)
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
Opt-Out a User
|
401
|
+
|
402
|
+
### Example
|
403
|
+
|
404
|
+
```ruby
|
405
|
+
# load the gem
|
406
|
+
require 'adzerk_decision_sdk'
|
407
|
+
|
408
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
409
|
+
network_id = 56 # Integer | Your Network Id
|
410
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
411
|
+
|
412
|
+
begin
|
413
|
+
result = api_instance.opt_out(network_id, user_key)
|
414
|
+
p result
|
415
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
416
|
+
puts "Exception when calling UserdbApi->opt_out: #{e}"
|
417
|
+
end
|
418
|
+
```
|
419
|
+
|
420
|
+
### Parameters
|
421
|
+
|
422
|
+
|
423
|
+
Name | Type | Description | Notes
|
424
|
+
------------- | ------------- | ------------- | -------------
|
425
|
+
**network_id** | **Integer**| Your Network Id |
|
426
|
+
**user_key** | **String**| The User's UserDB Key |
|
427
|
+
|
428
|
+
### Return type
|
429
|
+
|
430
|
+
**File**
|
431
|
+
|
432
|
+
### Authorization
|
433
|
+
|
434
|
+
No authorization required
|
435
|
+
|
436
|
+
### HTTP request headers
|
437
|
+
|
438
|
+
- **Content-Type**: Not defined
|
439
|
+
- **Accept**: image/gif
|
440
|
+
|
441
|
+
|
442
|
+
## read
|
443
|
+
|
444
|
+
> Object read(network_id, user_key)
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
Read a User's UserDB Record
|
449
|
+
|
450
|
+
### Example
|
451
|
+
|
452
|
+
```ruby
|
453
|
+
# load the gem
|
454
|
+
require 'adzerk_decision_sdk'
|
455
|
+
|
456
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
457
|
+
network_id = 56 # Integer | Your Network Id
|
458
|
+
user_key = 'user_key_example' # String | The User's UserDB Key
|
459
|
+
|
460
|
+
begin
|
461
|
+
result = api_instance.read(network_id, user_key)
|
462
|
+
p result
|
463
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
464
|
+
puts "Exception when calling UserdbApi->read: #{e}"
|
465
|
+
end
|
466
|
+
```
|
467
|
+
|
468
|
+
### Parameters
|
469
|
+
|
470
|
+
|
471
|
+
Name | Type | Description | Notes
|
472
|
+
------------- | ------------- | ------------- | -------------
|
473
|
+
**network_id** | **Integer**| Your Network Id |
|
474
|
+
**user_key** | **String**| The User's UserDB Key |
|
475
|
+
|
476
|
+
### Return type
|
477
|
+
|
478
|
+
**Object**
|
479
|
+
|
480
|
+
### Authorization
|
481
|
+
|
482
|
+
No authorization required
|
483
|
+
|
484
|
+
### HTTP request headers
|
485
|
+
|
486
|
+
- **Content-Type**: Not defined
|
487
|
+
- **Accept**: application/json
|
488
|
+
|
489
|
+
|
490
|
+
## set_user_cookie
|
491
|
+
|
492
|
+
> File set_user_cookie(network_id, user_key)
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
Set User Cookie
|
497
|
+
|
498
|
+
### Example
|
499
|
+
|
500
|
+
```ruby
|
501
|
+
# load the gem
|
502
|
+
require 'adzerk_decision_sdk'
|
503
|
+
|
504
|
+
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
505
|
+
network_id = 56 # Integer | Your Network Id
|
506
|
+
user_key = 'user_key_example' # String | UserDB Id for the user
|
507
|
+
|
508
|
+
begin
|
509
|
+
result = api_instance.set_user_cookie(network_id, user_key)
|
510
|
+
p result
|
511
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
512
|
+
puts "Exception when calling UserdbApi->set_user_cookie: #{e}"
|
513
|
+
end
|
514
|
+
```
|
515
|
+
|
516
|
+
### Parameters
|
517
|
+
|
518
|
+
|
519
|
+
Name | Type | Description | Notes
|
520
|
+
------------- | ------------- | ------------- | -------------
|
521
|
+
**network_id** | **Integer**| Your Network Id |
|
522
|
+
**user_key** | **String**| UserDB Id for the user |
|
523
|
+
|
524
|
+
### Return type
|
525
|
+
|
526
|
+
**File**
|
527
|
+
|
528
|
+
### Authorization
|
529
|
+
|
530
|
+
No authorization required
|
531
|
+
|
532
|
+
### HTTP request headers
|
533
|
+
|
534
|
+
- **Content-Type**: Not defined
|
535
|
+
- **Accept**: image/gif
|
536
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=`git remote`
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
58
|
+
|
@@ -0,0 +1,80 @@
|
|
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 DecisionApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Request Decision(s)
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [DecisionRequest] :decision_request
|
25
|
+
# @return [DecisionResponse]
|
26
|
+
def get_decisions(opts = {})
|
27
|
+
data, _status_code, _headers = get_decisions_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Request Decision(s)
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [DecisionRequest] :decision_request
|
34
|
+
# @return [Array<(DecisionResponse, Integer, Hash)>] DecisionResponse data, response status code and response headers
|
35
|
+
def get_decisions_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: DecisionApi.get_decisions ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/api/v2'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
49
|
+
# HTTP header 'Content-Type'
|
50
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
51
|
+
|
52
|
+
# form parameters
|
53
|
+
form_params = opts[:form_params] || {}
|
54
|
+
|
55
|
+
# http body (model)
|
56
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'decision_request'])
|
57
|
+
|
58
|
+
# return_type
|
59
|
+
return_type = opts[:return_type] || 'DecisionResponse'
|
60
|
+
|
61
|
+
# auth_names
|
62
|
+
auth_names = opts[:auth_names] || []
|
63
|
+
|
64
|
+
new_options = opts.merge(
|
65
|
+
:header_params => header_params,
|
66
|
+
:query_params => query_params,
|
67
|
+
:form_params => form_params,
|
68
|
+
:body => post_body,
|
69
|
+
:auth_names => auth_names,
|
70
|
+
:return_type => return_type
|
71
|
+
)
|
72
|
+
|
73
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
74
|
+
if @api_client.config.debugging
|
75
|
+
@api_client.config.logger.debug "API called: DecisionApi#get_decisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
76
|
+
end
|
77
|
+
return data, status_code, headers
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|