adzerk_decision_sdk 1.0.0.pre.beta.6 → 1.0.0.pre.beta.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -7
- data/README.md +16 -2
- data/adzerk_decision_sdk.gemspec +3 -4
- data/docs/ConsentRequest.md +10 -9
- data/docs/Content.md +16 -15
- data/docs/Decision.md +28 -27
- data/docs/DecisionApi.md +30 -13
- data/docs/DecisionRequest.md +44 -41
- data/docs/DecisionResponse.md +12 -11
- data/docs/Event.md +10 -9
- data/docs/MatchedPoint.md +10 -9
- data/docs/Placement.md +46 -45
- data/docs/PricingData.md +16 -15
- data/docs/User.md +8 -7
- data/docs/UserdbApi.md +259 -98
- data/lib/adzerk_decision_sdk/api/decision_api.rb +5 -4
- data/lib/adzerk_decision_sdk/api/userdb_api.rb +37 -28
- data/lib/adzerk_decision_sdk/api_client.rb +50 -48
- data/lib/adzerk_decision_sdk/api_error.rb +1 -1
- data/lib/adzerk_decision_sdk/configuration.rb +39 -10
- data/lib/adzerk_decision_sdk/models/consent_request.rb +19 -7
- data/lib/adzerk_decision_sdk/models/content.rb +19 -7
- data/lib/adzerk_decision_sdk/models/decision.rb +19 -7
- data/lib/adzerk_decision_sdk/models/decision_request.rb +32 -10
- data/lib/adzerk_decision_sdk/models/decision_response.rb +19 -7
- data/lib/adzerk_decision_sdk/models/event.rb +19 -7
- data/lib/adzerk_decision_sdk/models/matched_point.rb +19 -7
- data/lib/adzerk_decision_sdk/models/placement.rb +19 -7
- data/lib/adzerk_decision_sdk/models/pricing_data.rb +19 -7
- data/lib/adzerk_decision_sdk/models/user.rb +19 -7
- data/lib/adzerk_decision_sdk/version.rb +1 -1
- data/spec/spec_helper.rb +91 -0
- metadata +11 -30
- data/pkg/adzerk_decision_sdk-1.0.0.pre.beta.3.gem +0 -0
data/docs/MatchedPoint.md
CHANGED
@@ -2,18 +2,19 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**lat** | **String** | | [optional]
|
8
|
-
**lon** | **String** | | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **lat** | **String** | | [optional] |
|
8
|
+
| **lon** | **String** | | [optional] |
|
9
9
|
|
10
|
-
##
|
10
|
+
## Example
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
require '
|
13
|
+
require 'adzerk_decision_sdk'
|
14
14
|
|
15
|
-
instance = AdzerkDecisionSdk::MatchedPoint.new(
|
16
|
-
|
15
|
+
instance = AdzerkDecisionSdk::MatchedPoint.new(
|
16
|
+
lat: null,
|
17
|
+
lon: null
|
18
|
+
)
|
17
19
|
```
|
18
20
|
|
19
|
-
|
data/docs/Placement.md
CHANGED
@@ -2,54 +2,55 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**div_name** | **String** | A unique name for the placement defined by you | [optional]
|
8
|
-
**network_id** | **Integer** | The numeric network id | [optional]
|
9
|
-
**site_id** | **Integer** | The numeric site id | [optional]
|
10
|
-
**ad_types** | **Array<Integer>** | One or more integer ad types. More info [here](https://dev.adzerk.com/docs/ad-sizes) | [optional]
|
11
|
-
**zone_ids** | **Array<Integer>** | Zone IDs to use | [optional]
|
12
|
-
**campaign_id** | **Integer** | A numeric campaign id; if specified, only consider ads in that campaign | [optional]
|
13
|
-
**flight_id** | **Integer** | A numeric ad (flight-creative map) id; if specified, only serve that ad if possible | [optional]
|
14
|
-
**ad_id** | **Integer** | A numeric ad (flight-creative map) id; if specified, only serve that ad if possible | [optional]
|
15
|
-
**click_url** | **String** | The ad's click-through URL | [optional]
|
16
|
-
**properties** |
|
17
|
-
**event_ids** | **Array<Integer>** | An array of numeric event types. Requests tracking URLs for custom events. See here for [Event Tracking IDs](https://dev.adzerk.com/v1.0/docs/custom-event-tracking) | [optional]
|
18
|
-
**overrides** |
|
19
|
-
**content_keys** | **Hash<String, Integer>** | A map of key/value pairs used with [ContentDB](https://dev.adzerk.com/docs/contentdb-1). The format is `\"contentKeys\": {\"schema\": \"contentKey\"}` | [optional]
|
20
|
-
**count** | **Integer** | (BETA) The number of ads to return per placement. Integer between 1 and 20 | [optional]
|
21
|
-
**proportionality** | **Boolean** | (BETA) If true, fills ads in a multi-winner placement in proportion to the flight's goals | [optional]
|
22
|
-
**ecpm_partition** | **String** | (BETA) The name of the eCPM Partition that should be used to source eCPM data for auctions | [optional]
|
23
|
-
**ecpm_partitions** | **Array<String>** | (BETA) The names of the eCPM Partitions that should be used to source eCPM data for auctions | [optional]
|
24
|
-
**event_multiplier** | **Integer** | | [optional]
|
25
|
-
**skip_selection** | **Boolean** | | [optional]
|
26
|
-
**ad_query** |
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **div_name** | **String** | A unique name for the placement defined by you | [optional] |
|
8
|
+
| **network_id** | **Integer** | The numeric network id | [optional] |
|
9
|
+
| **site_id** | **Integer** | The numeric site id | [optional] |
|
10
|
+
| **ad_types** | **Array<Integer>** | One or more integer ad types. More info [here](https://dev.adzerk.com/docs/ad-sizes) | [optional] |
|
11
|
+
| **zone_ids** | **Array<Integer>** | Zone IDs to use | [optional] |
|
12
|
+
| **campaign_id** | **Integer** | A numeric campaign id; if specified, only consider ads in that campaign | [optional] |
|
13
|
+
| **flight_id** | **Integer** | A numeric ad (flight-creative map) id; if specified, only serve that ad if possible | [optional] |
|
14
|
+
| **ad_id** | **Integer** | A numeric ad (flight-creative map) id; if specified, only serve that ad if possible | [optional] |
|
15
|
+
| **click_url** | **String** | The ad's click-through URL | [optional] |
|
16
|
+
| **properties** | **Object** | A map of key/value pairs used for [Custom Targeting](https://dev.adzerk.com/docs/custom-targeting) | [optional] |
|
17
|
+
| **event_ids** | **Array<Integer>** | An array of numeric event types. Requests tracking URLs for custom events. See here for [Event Tracking IDs](https://dev.adzerk.com/v1.0/docs/custom-event-tracking) | [optional] |
|
18
|
+
| **overrides** | **Object** | An object that overrides values for an advertiser, campaign, flight or ad. Used especially for header bidding | [optional] |
|
19
|
+
| **content_keys** | **Hash<String, Integer>** | A map of key/value pairs used with [ContentDB](https://dev.adzerk.com/docs/contentdb-1). The format is `\"contentKeys\": {\"schema\": \"contentKey\"}` | [optional] |
|
20
|
+
| **count** | **Integer** | (BETA) The number of ads to return per placement. Integer between 1 and 20 | [optional] |
|
21
|
+
| **proportionality** | **Boolean** | (BETA) If true, fills ads in a multi-winner placement in proportion to the flight's goals | [optional] |
|
22
|
+
| **ecpm_partition** | **String** | (BETA) The name of the eCPM Partition that should be used to source eCPM data for auctions | [optional] |
|
23
|
+
| **ecpm_partitions** | **Array<String>** | (BETA) The names of the eCPM Partitions that should be used to source eCPM data for auctions | [optional] |
|
24
|
+
| **event_multiplier** | **Integer** | | [optional] |
|
25
|
+
| **skip_selection** | **Boolean** | | [optional] |
|
26
|
+
| **ad_query** | **Object** | | [optional] |
|
27
27
|
|
28
|
-
##
|
28
|
+
## Example
|
29
29
|
|
30
30
|
```ruby
|
31
|
-
require '
|
31
|
+
require 'adzerk_decision_sdk'
|
32
32
|
|
33
|
-
instance = AdzerkDecisionSdk::Placement.new(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
33
|
+
instance = AdzerkDecisionSdk::Placement.new(
|
34
|
+
div_name: null,
|
35
|
+
network_id: null,
|
36
|
+
site_id: null,
|
37
|
+
ad_types: null,
|
38
|
+
zone_ids: null,
|
39
|
+
campaign_id: null,
|
40
|
+
flight_id: null,
|
41
|
+
ad_id: null,
|
42
|
+
click_url: null,
|
43
|
+
properties: null,
|
44
|
+
event_ids: null,
|
45
|
+
overrides: null,
|
46
|
+
content_keys: null,
|
47
|
+
count: null,
|
48
|
+
proportionality: null,
|
49
|
+
ecpm_partition: null,
|
50
|
+
ecpm_partitions: null,
|
51
|
+
event_multiplier: null,
|
52
|
+
skip_selection: null,
|
53
|
+
ad_query: null
|
54
|
+
)
|
53
55
|
```
|
54
56
|
|
55
|
-
|
data/docs/PricingData.md
CHANGED
@@ -2,24 +2,25 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**price** | **Float** | | [optional]
|
8
|
-
**clear_price** | **Float** | | [optional]
|
9
|
-
**revenue** | **Float** | | [optional]
|
10
|
-
**rate_type** | **Integer** | | [optional]
|
11
|
-
**e_cpm** | **Float** | | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **price** | **Float** | | [optional] |
|
8
|
+
| **clear_price** | **Float** | | [optional] |
|
9
|
+
| **revenue** | **Float** | | [optional] |
|
10
|
+
| **rate_type** | **Integer** | | [optional] |
|
11
|
+
| **e_cpm** | **Float** | | [optional] |
|
12
12
|
|
13
|
-
##
|
13
|
+
## Example
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
require '
|
16
|
+
require 'adzerk_decision_sdk'
|
17
17
|
|
18
|
-
instance = AdzerkDecisionSdk::PricingData.new(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
instance = AdzerkDecisionSdk::PricingData.new(
|
19
|
+
price: null,
|
20
|
+
clear_price: null,
|
21
|
+
revenue: null,
|
22
|
+
rate_type: null,
|
23
|
+
e_cpm: null
|
24
|
+
)
|
23
25
|
```
|
24
26
|
|
25
|
-
|
data/docs/User.md
CHANGED
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**key** | **String** | The UserKey used for UserDB Targeting | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **key** | **String** | The UserKey used for UserDB Targeting | [optional] |
|
8
8
|
|
9
|
-
##
|
9
|
+
## Example
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
require '
|
12
|
+
require 'adzerk_decision_sdk'
|
13
13
|
|
14
|
-
instance = AdzerkDecisionSdk::User.new(
|
14
|
+
instance = AdzerkDecisionSdk::User.new(
|
15
|
+
key: null
|
16
|
+
)
|
15
17
|
```
|
16
18
|
|
17
|
-
|
data/docs/UserdbApi.md
CHANGED
@@ -2,18 +2,17 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *https://e-23.adzerk.net*
|
4
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
|
-
|
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 | |
|
17
16
|
|
18
17
|
|
19
18
|
## add_custom_properties
|
@@ -24,42 +23,60 @@ Method | HTTP request | Description
|
|
24
23
|
|
25
24
|
Add Custom Properties to a User
|
26
25
|
|
27
|
-
###
|
26
|
+
### Examples
|
28
27
|
|
29
28
|
```ruby
|
30
|
-
|
29
|
+
require 'time'
|
31
30
|
require 'adzerk_decision_sdk'
|
32
31
|
# setup authorization
|
33
32
|
AdzerkDecisionSdk.configure do |config|
|
34
33
|
# Configure API key authorization: ApiKeyAuth
|
35
|
-
config.api_key['
|
34
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
36
35
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
37
|
-
#config.api_key_prefix['
|
36
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
38
37
|
end
|
39
38
|
|
40
39
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
41
40
|
network_id = 56 # Integer | Your Network Id
|
42
41
|
user_key = 'user_key_example' # String | The User's UserDB Key
|
43
42
|
opts = {
|
44
|
-
body:
|
43
|
+
body: Object # Object |
|
45
44
|
}
|
46
45
|
|
47
46
|
begin
|
47
|
+
|
48
48
|
result = api_instance.add_custom_properties(network_id, user_key, opts)
|
49
49
|
p result
|
50
50
|
rescue AdzerkDecisionSdk::ApiError => e
|
51
|
-
puts "
|
51
|
+
puts "Error when calling UserdbApi->add_custom_properties: #{e}"
|
52
52
|
end
|
53
53
|
```
|
54
54
|
|
55
|
-
|
55
|
+
#### Using the add_custom_properties_with_http_info variant
|
56
|
+
|
57
|
+
This returns an Array which contains the response data, status code and headers.
|
58
|
+
|
59
|
+
> <Array(File, Integer, Hash)> add_custom_properties_with_http_info(network_id, user_key, opts)
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
begin
|
63
|
+
|
64
|
+
data, status_code, headers = api_instance.add_custom_properties_with_http_info(network_id, user_key, opts)
|
65
|
+
p status_code # => 2xx
|
66
|
+
p headers # => { ... }
|
67
|
+
p data # => File
|
68
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
69
|
+
puts "Error when calling UserdbApi->add_custom_properties_with_http_info: #{e}"
|
70
|
+
end
|
71
|
+
```
|
56
72
|
|
73
|
+
### Parameters
|
57
74
|
|
58
|
-
Name | Type | Description
|
59
|
-
|
60
|
-
**network_id** | **Integer
|
61
|
-
**user_key** | **String
|
62
|
-
**body** | **Object
|
75
|
+
| Name | Type | Description | Notes |
|
76
|
+
| ---- | ---- | ----------- | ----- |
|
77
|
+
| **network_id** | **Integer** | Your Network Id | |
|
78
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
79
|
+
| **body** | **Object** | | [optional] |
|
63
80
|
|
64
81
|
### Return type
|
65
82
|
|
@@ -83,10 +100,10 @@ Name | Type | Description | Notes
|
|
83
100
|
|
84
101
|
Add Interests to a User
|
85
102
|
|
86
|
-
###
|
103
|
+
### Examples
|
87
104
|
|
88
105
|
```ruby
|
89
|
-
|
106
|
+
require 'time'
|
90
107
|
require 'adzerk_decision_sdk'
|
91
108
|
|
92
109
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -95,21 +112,39 @@ user_key = 'user_key_example' # String | The User's UserDB Key
|
|
95
112
|
interest = 'interest_example' # String | Comma Seperated list of interests
|
96
113
|
|
97
114
|
begin
|
115
|
+
|
98
116
|
result = api_instance.add_interests(network_id, user_key, interest)
|
99
117
|
p result
|
100
118
|
rescue AdzerkDecisionSdk::ApiError => e
|
101
|
-
puts "
|
119
|
+
puts "Error when calling UserdbApi->add_interests: #{e}"
|
102
120
|
end
|
103
121
|
```
|
104
122
|
|
105
|
-
|
123
|
+
#### Using the add_interests_with_http_info variant
|
106
124
|
|
125
|
+
This returns an Array which contains the response data, status code and headers.
|
107
126
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
127
|
+
> <Array(File, Integer, Hash)> add_interests_with_http_info(network_id, user_key, interest)
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
begin
|
131
|
+
|
132
|
+
data, status_code, headers = api_instance.add_interests_with_http_info(network_id, user_key, interest)
|
133
|
+
p status_code # => 2xx
|
134
|
+
p headers # => { ... }
|
135
|
+
p data # => File
|
136
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
137
|
+
puts "Error when calling UserdbApi->add_interests_with_http_info: #{e}"
|
138
|
+
end
|
139
|
+
```
|
140
|
+
|
141
|
+
### Parameters
|
142
|
+
|
143
|
+
| Name | Type | Description | Notes |
|
144
|
+
| ---- | ---- | ----------- | ----- |
|
145
|
+
| **network_id** | **Integer** | Your Network Id | |
|
146
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
147
|
+
| **interest** | **String** | Comma Seperated list of interests | |
|
113
148
|
|
114
149
|
### Return type
|
115
150
|
|
@@ -133,10 +168,10 @@ No authorization required
|
|
133
168
|
|
134
169
|
Add User to a Retargeting Segment
|
135
170
|
|
136
|
-
###
|
171
|
+
### Examples
|
137
172
|
|
138
173
|
```ruby
|
139
|
-
|
174
|
+
require 'time'
|
140
175
|
require 'adzerk_decision_sdk'
|
141
176
|
|
142
177
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -146,22 +181,40 @@ retargeting_segment_id = 56 # Integer | The Segment's ID
|
|
146
181
|
user_key = 'user_key_example' # String | The User's UserDB Key
|
147
182
|
|
148
183
|
begin
|
184
|
+
|
149
185
|
result = api_instance.add_retargeting_segment(network_id, advertiser_id, retargeting_segment_id, user_key)
|
150
186
|
p result
|
151
187
|
rescue AdzerkDecisionSdk::ApiError => e
|
152
|
-
puts "
|
188
|
+
puts "Error when calling UserdbApi->add_retargeting_segment: #{e}"
|
153
189
|
end
|
154
190
|
```
|
155
191
|
|
156
|
-
|
192
|
+
#### Using the add_retargeting_segment_with_http_info variant
|
193
|
+
|
194
|
+
This returns an Array which contains the response data, status code and headers.
|
157
195
|
|
196
|
+
> <Array(File, Integer, Hash)> add_retargeting_segment_with_http_info(network_id, advertiser_id, retargeting_segment_id, user_key)
|
158
197
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
198
|
+
```ruby
|
199
|
+
begin
|
200
|
+
|
201
|
+
data, status_code, headers = api_instance.add_retargeting_segment_with_http_info(network_id, advertiser_id, retargeting_segment_id, user_key)
|
202
|
+
p status_code # => 2xx
|
203
|
+
p headers # => { ... }
|
204
|
+
p data # => File
|
205
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
206
|
+
puts "Error when calling UserdbApi->add_retargeting_segment_with_http_info: #{e}"
|
207
|
+
end
|
208
|
+
```
|
209
|
+
|
210
|
+
### Parameters
|
211
|
+
|
212
|
+
| Name | Type | Description | Notes |
|
213
|
+
| ---- | ---- | ----------- | ----- |
|
214
|
+
| **network_id** | **Integer** | Your Network Id | |
|
215
|
+
| **advertiser_id** | **Integer** | The Advertiser's ID | |
|
216
|
+
| **retargeting_segment_id** | **Integer** | The Segment's ID | |
|
217
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
165
218
|
|
166
219
|
### Return type
|
167
220
|
|
@@ -185,17 +238,17 @@ No authorization required
|
|
185
238
|
|
186
239
|
Forget User
|
187
240
|
|
188
|
-
###
|
241
|
+
### Examples
|
189
242
|
|
190
243
|
```ruby
|
191
|
-
|
244
|
+
require 'time'
|
192
245
|
require 'adzerk_decision_sdk'
|
193
246
|
# setup authorization
|
194
247
|
AdzerkDecisionSdk.configure do |config|
|
195
248
|
# Configure API key authorization: ApiKeyAuth
|
196
|
-
config.api_key['
|
249
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
197
250
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
198
|
-
#config.api_key_prefix['
|
251
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
199
252
|
end
|
200
253
|
|
201
254
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -203,19 +256,37 @@ network_id = 56 # Integer | Your Network Id
|
|
203
256
|
user_key = 'user_key_example' # String | The User's UserDB Key
|
204
257
|
|
205
258
|
begin
|
259
|
+
|
206
260
|
api_instance.forget(network_id, user_key)
|
207
261
|
rescue AdzerkDecisionSdk::ApiError => e
|
208
|
-
puts "
|
262
|
+
puts "Error when calling UserdbApi->forget: #{e}"
|
209
263
|
end
|
210
264
|
```
|
211
265
|
|
212
|
-
|
266
|
+
#### Using the forget_with_http_info variant
|
213
267
|
|
268
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
214
269
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
270
|
+
> <Array(nil, Integer, Hash)> forget_with_http_info(network_id, user_key)
|
271
|
+
|
272
|
+
```ruby
|
273
|
+
begin
|
274
|
+
|
275
|
+
data, status_code, headers = api_instance.forget_with_http_info(network_id, user_key)
|
276
|
+
p status_code # => 2xx
|
277
|
+
p headers # => { ... }
|
278
|
+
p data # => nil
|
279
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
280
|
+
puts "Error when calling UserdbApi->forget_with_http_info: #{e}"
|
281
|
+
end
|
282
|
+
```
|
283
|
+
|
284
|
+
### Parameters
|
285
|
+
|
286
|
+
| Name | Type | Description | Notes |
|
287
|
+
| ---- | ---- | ----------- | ----- |
|
288
|
+
| **network_id** | **Integer** | Your Network Id | |
|
289
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
219
290
|
|
220
291
|
### Return type
|
221
292
|
|
@@ -239,17 +310,17 @@ nil (empty response body)
|
|
239
310
|
|
240
311
|
GDPR Consent
|
241
312
|
|
242
|
-
###
|
313
|
+
### Examples
|
243
314
|
|
244
315
|
```ruby
|
245
|
-
|
316
|
+
require 'time'
|
246
317
|
require 'adzerk_decision_sdk'
|
247
318
|
# setup authorization
|
248
319
|
AdzerkDecisionSdk.configure do |config|
|
249
320
|
# Configure API key authorization: ApiKeyAuth
|
250
|
-
config.api_key['
|
321
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
251
322
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
252
|
-
#config.api_key_prefix['
|
323
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
253
324
|
end
|
254
325
|
|
255
326
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -259,20 +330,38 @@ opts = {
|
|
259
330
|
}
|
260
331
|
|
261
332
|
begin
|
333
|
+
|
262
334
|
result = api_instance.gdpr_consent(network_id, opts)
|
263
335
|
p result
|
264
336
|
rescue AdzerkDecisionSdk::ApiError => e
|
265
|
-
puts "
|
337
|
+
puts "Error when calling UserdbApi->gdpr_consent: #{e}"
|
266
338
|
end
|
267
339
|
```
|
268
340
|
|
269
|
-
|
341
|
+
#### Using the gdpr_consent_with_http_info variant
|
270
342
|
|
343
|
+
This returns an Array which contains the response data, status code and headers.
|
271
344
|
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
345
|
+
> <Array(File, Integer, Hash)> gdpr_consent_with_http_info(network_id, opts)
|
346
|
+
|
347
|
+
```ruby
|
348
|
+
begin
|
349
|
+
|
350
|
+
data, status_code, headers = api_instance.gdpr_consent_with_http_info(network_id, opts)
|
351
|
+
p status_code # => 2xx
|
352
|
+
p headers # => { ... }
|
353
|
+
p data # => File
|
354
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
355
|
+
puts "Error when calling UserdbApi->gdpr_consent_with_http_info: #{e}"
|
356
|
+
end
|
357
|
+
```
|
358
|
+
|
359
|
+
### Parameters
|
360
|
+
|
361
|
+
| Name | Type | Description | Notes |
|
362
|
+
| ---- | ---- | ----------- | ----- |
|
363
|
+
| **network_id** | **Integer** | Your Network Id | |
|
364
|
+
| **consent_request** | [**ConsentRequest**](ConsentRequest.md) | | [optional] |
|
276
365
|
|
277
366
|
### Return type
|
278
367
|
|
@@ -296,10 +385,10 @@ Name | Type | Description | Notes
|
|
296
385
|
|
297
386
|
IP Address Override
|
298
387
|
|
299
|
-
###
|
388
|
+
### Examples
|
300
389
|
|
301
390
|
```ruby
|
302
|
-
|
391
|
+
require 'time'
|
303
392
|
require 'adzerk_decision_sdk'
|
304
393
|
|
305
394
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -308,21 +397,39 @@ user_key = 'user_key_example' # String | The User's UserDB Key
|
|
308
397
|
ip = 'ip_example' # String | This is the IP to exclude
|
309
398
|
|
310
399
|
begin
|
400
|
+
|
311
401
|
result = api_instance.ip_override(network_id, user_key, ip)
|
312
402
|
p result
|
313
403
|
rescue AdzerkDecisionSdk::ApiError => e
|
314
|
-
puts "
|
404
|
+
puts "Error when calling UserdbApi->ip_override: #{e}"
|
315
405
|
end
|
316
406
|
```
|
317
407
|
|
318
|
-
|
408
|
+
#### Using the ip_override_with_http_info variant
|
319
409
|
|
410
|
+
This returns an Array which contains the response data, status code and headers.
|
320
411
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
412
|
+
> <Array(File, Integer, Hash)> ip_override_with_http_info(network_id, user_key, ip)
|
413
|
+
|
414
|
+
```ruby
|
415
|
+
begin
|
416
|
+
|
417
|
+
data, status_code, headers = api_instance.ip_override_with_http_info(network_id, user_key, ip)
|
418
|
+
p status_code # => 2xx
|
419
|
+
p headers # => { ... }
|
420
|
+
p data # => File
|
421
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
422
|
+
puts "Error when calling UserdbApi->ip_override_with_http_info: #{e}"
|
423
|
+
end
|
424
|
+
```
|
425
|
+
|
426
|
+
### Parameters
|
427
|
+
|
428
|
+
| Name | Type | Description | Notes |
|
429
|
+
| ---- | ---- | ----------- | ----- |
|
430
|
+
| **network_id** | **Integer** | Your Network Id | |
|
431
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
432
|
+
| **ip** | **String** | This is the IP to exclude | |
|
326
433
|
|
327
434
|
### Return type
|
328
435
|
|
@@ -346,10 +453,10 @@ No authorization required
|
|
346
453
|
|
347
454
|
User Matching
|
348
455
|
|
349
|
-
###
|
456
|
+
### Examples
|
350
457
|
|
351
458
|
```ruby
|
352
|
-
|
459
|
+
require 'time'
|
353
460
|
require 'adzerk_decision_sdk'
|
354
461
|
|
355
462
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -359,22 +466,40 @@ partner_id = 56 # Integer | The ID of the RTB provider in Adzerk. Contact Suppor
|
|
359
466
|
user_id = 56 # Integer | This is the UserID the individual RTB provider has of the user. This is NOT the UserDB userkey.
|
360
467
|
|
361
468
|
begin
|
469
|
+
|
362
470
|
result = api_instance.match_user(network_id, user_key, partner_id, user_id)
|
363
471
|
p result
|
364
472
|
rescue AdzerkDecisionSdk::ApiError => e
|
365
|
-
puts "
|
473
|
+
puts "Error when calling UserdbApi->match_user: #{e}"
|
366
474
|
end
|
367
475
|
```
|
368
476
|
|
369
|
-
|
477
|
+
#### Using the match_user_with_http_info variant
|
370
478
|
|
479
|
+
This returns an Array which contains the response data, status code and headers.
|
371
480
|
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
481
|
+
> <Array(File, Integer, Hash)> match_user_with_http_info(network_id, user_key, partner_id, user_id)
|
482
|
+
|
483
|
+
```ruby
|
484
|
+
begin
|
485
|
+
|
486
|
+
data, status_code, headers = api_instance.match_user_with_http_info(network_id, user_key, partner_id, user_id)
|
487
|
+
p status_code # => 2xx
|
488
|
+
p headers # => { ... }
|
489
|
+
p data # => File
|
490
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
491
|
+
puts "Error when calling UserdbApi->match_user_with_http_info: #{e}"
|
492
|
+
end
|
493
|
+
```
|
494
|
+
|
495
|
+
### Parameters
|
496
|
+
|
497
|
+
| Name | Type | Description | Notes |
|
498
|
+
| ---- | ---- | ----------- | ----- |
|
499
|
+
| **network_id** | **Integer** | Your Network Id | |
|
500
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
501
|
+
| **partner_id** | **Integer** | The ID of the RTB provider in Adzerk. Contact Support if you don't have the ID. | |
|
502
|
+
| **user_id** | **Integer** | This is the UserID the individual RTB provider has of the user. This is NOT the UserDB userkey. | |
|
378
503
|
|
379
504
|
### Return type
|
380
505
|
|
@@ -398,10 +523,10 @@ No authorization required
|
|
398
523
|
|
399
524
|
Opt-Out a User
|
400
525
|
|
401
|
-
###
|
526
|
+
### Examples
|
402
527
|
|
403
528
|
```ruby
|
404
|
-
|
529
|
+
require 'time'
|
405
530
|
require 'adzerk_decision_sdk'
|
406
531
|
|
407
532
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -409,20 +534,38 @@ network_id = 56 # Integer | Your Network Id
|
|
409
534
|
user_key = 'user_key_example' # String | The User's UserDB Key
|
410
535
|
|
411
536
|
begin
|
537
|
+
|
412
538
|
result = api_instance.opt_out(network_id, user_key)
|
413
539
|
p result
|
414
540
|
rescue AdzerkDecisionSdk::ApiError => e
|
415
|
-
puts "
|
541
|
+
puts "Error when calling UserdbApi->opt_out: #{e}"
|
416
542
|
end
|
417
543
|
```
|
418
544
|
|
419
|
-
|
545
|
+
#### Using the opt_out_with_http_info variant
|
546
|
+
|
547
|
+
This returns an Array which contains the response data, status code and headers.
|
548
|
+
|
549
|
+
> <Array(File, Integer, Hash)> opt_out_with_http_info(network_id, user_key)
|
550
|
+
|
551
|
+
```ruby
|
552
|
+
begin
|
553
|
+
|
554
|
+
data, status_code, headers = api_instance.opt_out_with_http_info(network_id, user_key)
|
555
|
+
p status_code # => 2xx
|
556
|
+
p headers # => { ... }
|
557
|
+
p data # => File
|
558
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
559
|
+
puts "Error when calling UserdbApi->opt_out_with_http_info: #{e}"
|
560
|
+
end
|
561
|
+
```
|
420
562
|
|
563
|
+
### Parameters
|
421
564
|
|
422
|
-
Name | Type | Description
|
423
|
-
|
424
|
-
**network_id** | **Integer
|
425
|
-
**user_key** | **String
|
565
|
+
| Name | Type | Description | Notes |
|
566
|
+
| ---- | ---- | ----------- | ----- |
|
567
|
+
| **network_id** | **Integer** | Your Network Id | |
|
568
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
426
569
|
|
427
570
|
### Return type
|
428
571
|
|
@@ -446,10 +589,10 @@ No authorization required
|
|
446
589
|
|
447
590
|
Read a User's UserDB Record
|
448
591
|
|
449
|
-
###
|
592
|
+
### Examples
|
450
593
|
|
451
594
|
```ruby
|
452
|
-
|
595
|
+
require 'time'
|
453
596
|
require 'adzerk_decision_sdk'
|
454
597
|
|
455
598
|
api_instance = AdzerkDecisionSdk::UserdbApi.new
|
@@ -457,20 +600,38 @@ network_id = 56 # Integer | Your Network Id
|
|
457
600
|
user_key = 'user_key_example' # String | The User's UserDB Key
|
458
601
|
|
459
602
|
begin
|
603
|
+
|
460
604
|
result = api_instance.read(network_id, user_key)
|
461
605
|
p result
|
462
606
|
rescue AdzerkDecisionSdk::ApiError => e
|
463
|
-
puts "
|
607
|
+
puts "Error when calling UserdbApi->read: #{e}"
|
464
608
|
end
|
465
609
|
```
|
466
610
|
|
467
|
-
|
611
|
+
#### Using the read_with_http_info variant
|
612
|
+
|
613
|
+
This returns an Array which contains the response data, status code and headers.
|
468
614
|
|
615
|
+
> <Array(Object, Integer, Hash)> read_with_http_info(network_id, user_key)
|
616
|
+
|
617
|
+
```ruby
|
618
|
+
begin
|
619
|
+
|
620
|
+
data, status_code, headers = api_instance.read_with_http_info(network_id, user_key)
|
621
|
+
p status_code # => 2xx
|
622
|
+
p headers # => { ... }
|
623
|
+
p data # => Object
|
624
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
625
|
+
puts "Error when calling UserdbApi->read_with_http_info: #{e}"
|
626
|
+
end
|
627
|
+
```
|
628
|
+
|
629
|
+
### Parameters
|
469
630
|
|
470
|
-
Name | Type | Description
|
471
|
-
|
472
|
-
**network_id** | **Integer
|
473
|
-
**user_key** | **String
|
631
|
+
| Name | Type | Description | Notes |
|
632
|
+
| ---- | ---- | ----------- | ----- |
|
633
|
+
| **network_id** | **Integer** | Your Network Id | |
|
634
|
+
| **user_key** | **String** | The User's UserDB Key | |
|
474
635
|
|
475
636
|
### Return type
|
476
637
|
|