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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ffb53d3459cdf483d870b18c2618046e331e7c36ca40f2e3205892be67f3cd22
|
4
|
+
data.tar.gz: 5f915af0222e96de0adfdedebb06f29836afdb4fa4f9417d5182f8f9aa679ad3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 82d3aff0c40659a1fcbde114ac394170e0ed0e6406884cb3cda09ed966a5e5c7cf32482913ad57be0a7a6d3e4922217b22d5155143093d06606effc2d7691509
|
7
|
+
data.tar.gz: a080a10d094e60e3dcb94b434c04ba52ca85c5d5b6930c76a688fc012067a26c02b08dfc53ac1bb447b500285bdf05747d29622513f5cb3300b79564ddfc3b27
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
adzerk_decision_sdk (1.0.0)
|
5
|
+
json (~> 2.1, >= 2.1.0)
|
6
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ast (2.4.0)
|
12
|
+
byebug (11.1.1)
|
13
|
+
coderay (1.1.2)
|
14
|
+
diff-lcs (1.3)
|
15
|
+
ethon (0.12.0)
|
16
|
+
ffi (>= 1.3.0)
|
17
|
+
ffi (1.12.2)
|
18
|
+
jaro_winkler (1.5.4)
|
19
|
+
json (2.3.0)
|
20
|
+
method_source (0.9.2)
|
21
|
+
parallel (1.19.1)
|
22
|
+
parser (2.7.0.2)
|
23
|
+
ast (~> 2.4.0)
|
24
|
+
pry (0.12.2)
|
25
|
+
coderay (~> 1.1.0)
|
26
|
+
method_source (~> 0.9.0)
|
27
|
+
pry-byebug (3.8.0)
|
28
|
+
byebug (~> 11.0)
|
29
|
+
pry (~> 0.10)
|
30
|
+
psych (3.1.0)
|
31
|
+
rainbow (3.0.0)
|
32
|
+
rake (12.0.0)
|
33
|
+
rspec (3.9.0)
|
34
|
+
rspec-core (~> 3.9.0)
|
35
|
+
rspec-expectations (~> 3.9.0)
|
36
|
+
rspec-mocks (~> 3.9.0)
|
37
|
+
rspec-core (3.9.1)
|
38
|
+
rspec-support (~> 3.9.1)
|
39
|
+
rspec-expectations (3.9.0)
|
40
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
+
rspec-support (~> 3.9.0)
|
42
|
+
rspec-mocks (3.9.1)
|
43
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
+
rspec-support (~> 3.9.0)
|
45
|
+
rspec-support (3.9.2)
|
46
|
+
rubocop (0.66.0)
|
47
|
+
jaro_winkler (~> 1.5.1)
|
48
|
+
parallel (~> 1.10)
|
49
|
+
parser (>= 2.5, != 2.5.1.1)
|
50
|
+
psych (>= 3.1.0)
|
51
|
+
rainbow (>= 2.2.2, < 4.0)
|
52
|
+
ruby-progressbar (~> 1.7)
|
53
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
54
|
+
ruby-progressbar (1.10.1)
|
55
|
+
typhoeus (1.3.1)
|
56
|
+
ethon (>= 0.9.0)
|
57
|
+
unicode-display_width (1.5.0)
|
58
|
+
|
59
|
+
PLATFORMS
|
60
|
+
ruby
|
61
|
+
|
62
|
+
DEPENDENCIES
|
63
|
+
adzerk_decision_sdk!
|
64
|
+
pry-byebug
|
65
|
+
rake (~> 12.0.0)
|
66
|
+
rspec (~> 3.6, >= 3.6.0)
|
67
|
+
rubocop (~> 0.66.0)
|
68
|
+
|
69
|
+
BUNDLED WITH
|
70
|
+
2.1.2
|
data/README.md
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
# Adzerk Ruby Decision SDK
|
2
|
+
|
3
|
+
Ruby Software Development Kit for Adzerk Decision & UserDB APIs
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Requires [Ruby 2.5](https://en.wikipedia.org/wiki/Ruby_(programming_language)#Table_of_versions) or higher.
|
8
|
+
|
9
|
+
```shell
|
10
|
+
gem install adzerk_decision_sdk
|
11
|
+
```
|
12
|
+
|
13
|
+
Or add to your `Gemfile`:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'adzerk_decision_sdk', '~> 1.0.0'
|
17
|
+
```
|
18
|
+
|
19
|
+
## Examples
|
20
|
+
|
21
|
+
### API Credentials & Required IDs
|
22
|
+
|
23
|
+
- Network ID: Log into [Adzerk UI](https://app.adzerk.com/) & use the "circle-i" help menu in upper right corner to find Network ID. Required for all SDK operations.
|
24
|
+
- Site ID: Go to [Manage Sites page](https://app.adzerk.com/#!/sites/) to find site IDs. Required when fetching an ad decision.
|
25
|
+
- Ad Type ID: Go to [Ad Sizes page](https://app.adzerk.com/#!/ad-sizes/) to find Ad Type IDs. Required when fetching an ad decision.
|
26
|
+
- API Key: Go to [API Keys page](https://app.adzerk.com/#!/api-keys/) find active API keys. Required when writing to UserDB.
|
27
|
+
- User Key: UserDB IDs are [specified or generated for each user](https://dev.adzerk.com/reference/userdb#passing-the-userkey).
|
28
|
+
|
29
|
+
### Fetching an Ad Decision
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
require "adzerk_decision_sdk"
|
33
|
+
|
34
|
+
# Demo network, site, and ad type IDs; find your own via the Adzerk UI!
|
35
|
+
client = AdzerkDecisionSdk::Client.new(network_id: 23, site_id: 667480)
|
36
|
+
|
37
|
+
request = {
|
38
|
+
placements: [{ adTypes: [5] }],
|
39
|
+
user: { key: "abc" },
|
40
|
+
keywords: ["keyword1", "keyword2"],
|
41
|
+
}
|
42
|
+
|
43
|
+
pp client.decisions.get(request)
|
44
|
+
```
|
45
|
+
|
46
|
+
### UserDB: Reading User Record
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
require "adzerk_decision_sdk"
|
50
|
+
|
51
|
+
# Demo network ID; find your own via the Adzerk UI!
|
52
|
+
client = AdzerkDecisionSdk::Client.new(network_id: 23)
|
53
|
+
pp client.user_db.read("abc")
|
54
|
+
```
|
55
|
+
|
56
|
+
### UserDB: Setting Custom Properties
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
require "adzerk_decision_sdk"
|
60
|
+
|
61
|
+
# Demo network ID; find your own via the Adzerk UI!
|
62
|
+
client = AdzerkDecisionSdk::Client.new(network_id: 23, api_key: "YOUR_API_KEY")
|
63
|
+
|
64
|
+
props = {
|
65
|
+
favoriteColor: "blue",
|
66
|
+
favoriteNumber: 42,
|
67
|
+
favoriteFoods: ["strawberries", "chocolate"],
|
68
|
+
}
|
69
|
+
|
70
|
+
client.user_db.set_custom_properties("abc", props)
|
71
|
+
```
|
72
|
+
|
73
|
+
<!-- ### Logging Example
|
74
|
+
|
75
|
+
TBD: ....... -->
|
76
|
+
|
77
|
+
## Documentation
|
78
|
+
|
79
|
+
- [Adzerk API Documentation](https://dev.adzerk.com/reference)
|
80
|
+
- [Adzerk User & Developer Documentation](https://dev.adzerk.com/docs)
|
81
|
+
|
82
|
+
## Contributing
|
83
|
+
|
84
|
+
### Reporting Issues
|
85
|
+
|
86
|
+
- For bug fixes and improvements to this SDK please use Github to [open an issue](https://github.com/adzerk/adzerk-decision-sdk-ruby/issues) or send us a [pull request](https://github.com/adzerk/adzerk-decision-sdk-ruby/pulls).
|
87
|
+
- For questions or issues regarding Adzerk functionality, please [contact Adzerk support](https://adzerk.com/help/).
|
88
|
+
|
89
|
+
### Building
|
90
|
+
|
91
|
+
To install dependencies and run the builds associated with this SDK, please use:
|
92
|
+
|
93
|
+
```
|
94
|
+
bundler install
|
95
|
+
rake spec
|
96
|
+
gem build adzerk_decision_sdk.gemspec
|
97
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Adzerk Decision API
|
5
|
+
|
6
|
+
#Adzerk Decision API
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 4.2.3
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "adzerk_decision_sdk/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "adzerk_decision_sdk"
|
20
|
+
s.version = AdzerkDecisionSdk::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Adzerk, Inc."]
|
23
|
+
s.email = ["engineering@adzerk.com"]
|
24
|
+
s.homepage = "http://adzerk.com"
|
25
|
+
s.summary = "Adzerk Decision API"
|
26
|
+
s.description = "Ruby library for the Adzerk Decision API"
|
27
|
+
s.license = 'Apache-2.0'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
|
35
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
36
|
+
s.test_files = `find spec/*`.split("\n")
|
37
|
+
s.executables = []
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
end
|
data/docs/Consent.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# AdzerkDecisionSdk::Consent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**gdpr** | **Boolean** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'AdzerkDecisionSdk'
|
13
|
+
|
14
|
+
instance = AdzerkDecisionSdk::Consent.new(gdpr: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# AdzerkDecisionSdk::ConsentRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**user_key** | **String** | | [optional]
|
8
|
+
**consent** | [**Object**](.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'AdzerkDecisionSdk'
|
14
|
+
|
15
|
+
instance = AdzerkDecisionSdk::ConsentRequest.new(user_key: null,
|
16
|
+
consent: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/Content.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# AdzerkDecisionSdk::Content
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**type** | **String** | | [optional]
|
8
|
+
**template** | **String** | | [optional]
|
9
|
+
**custom_template** | **String** | | [optional]
|
10
|
+
**data** | [**DecisionData**](DecisionData.md) | | [optional]
|
11
|
+
**body** | **String** | | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'AdzerkDecisionSdk'
|
17
|
+
|
18
|
+
instance = AdzerkDecisionSdk::Content.new(type: null,
|
19
|
+
template: null,
|
20
|
+
custom_template: null,
|
21
|
+
data: null,
|
22
|
+
body: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/docs/Decision.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# AdzerkDecisionSdk::Decision
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**ad_id** | **Integer** | | [optional]
|
8
|
+
**creative_id** | **Integer** | | [optional]
|
9
|
+
**flight_id** | **Integer** | | [optional]
|
10
|
+
**campaign_id** | **Integer** | | [optional]
|
11
|
+
**priority_id** | **Integer** | | [optional]
|
12
|
+
**click_url** | **String** | | [optional]
|
13
|
+
**contents** | [**Array<Content>**](Content.md) | | [optional]
|
14
|
+
**impression_url** | **String** | | [optional]
|
15
|
+
**events** | [**Array<Event>**](Event.md) | | [optional]
|
16
|
+
**pricing** | [**PricingData**](PricingData.md) | | [optional]
|
17
|
+
|
18
|
+
## Code Sample
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'AdzerkDecisionSdk'
|
22
|
+
|
23
|
+
instance = AdzerkDecisionSdk::Decision.new(ad_id: null,
|
24
|
+
creative_id: null,
|
25
|
+
flight_id: null,
|
26
|
+
campaign_id: null,
|
27
|
+
priority_id: null,
|
28
|
+
click_url: null,
|
29
|
+
contents: null,
|
30
|
+
impression_url: null,
|
31
|
+
events: null,
|
32
|
+
pricing: null)
|
33
|
+
```
|
34
|
+
|
35
|
+
|
data/docs/DecisionApi.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# AdzerkDecisionSdk::DecisionApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://e-23.adzerk.net*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_decisions**](DecisionApi.md#get_decisions) | **POST** /api/v2 |
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## get_decisions
|
12
|
+
|
13
|
+
> DecisionResponse get_decisions(opts)
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
Request Decision(s)
|
18
|
+
|
19
|
+
### Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'adzerk_decision_sdk'
|
24
|
+
|
25
|
+
api_instance = AdzerkDecisionSdk::DecisionApi.new
|
26
|
+
opts = {
|
27
|
+
decision_request: {"placements": [{ "divName": "header", "networkId": 23, "siteId": 667480, "adTypes": [5] }] } # DecisionRequest |
|
28
|
+
}
|
29
|
+
|
30
|
+
begin
|
31
|
+
result = api_instance.get_decisions(opts)
|
32
|
+
p result
|
33
|
+
rescue AdzerkDecisionSdk::ApiError => e
|
34
|
+
puts "Exception when calling DecisionApi->get_decisions: #{e}"
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
### Parameters
|
39
|
+
|
40
|
+
|
41
|
+
Name | Type | Description | Notes
|
42
|
+
------------- | ------------- | ------------- | -------------
|
43
|
+
**decision_request** | [**DecisionRequest**](DecisionRequest.md)| | [optional]
|
44
|
+
|
45
|
+
### Return type
|
46
|
+
|
47
|
+
[**DecisionResponse**](DecisionResponse.md)
|
48
|
+
|
49
|
+
### Authorization
|
50
|
+
|
51
|
+
No authorization required
|
52
|
+
|
53
|
+
### HTTP request headers
|
54
|
+
|
55
|
+
- **Content-Type**: application/json
|
56
|
+
- **Accept**: application/json
|
57
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# AdzerkDecisionSdk::DecisionData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**image_url** | **String** | | [optional]
|
8
|
+
**title** | **String** | | [optional]
|
9
|
+
**width** | **Integer** | | [optional]
|
10
|
+
**height** | **Integer** | | [optional]
|
11
|
+
**custom_data** | [**Object**](.md) | | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'AdzerkDecisionSdk'
|
17
|
+
|
18
|
+
instance = AdzerkDecisionSdk::DecisionData.new(image_url: null,
|
19
|
+
title: null,
|
20
|
+
width: null,
|
21
|
+
height: null,
|
22
|
+
custom_data: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# AdzerkDecisionSdk::DecisionRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**placements** | [**Array<Placement>**](Placement.md) | One or more Placement objects |
|
8
|
+
**user** | [**User**](User.md) | | [optional]
|
9
|
+
**keywords** | **Array<String>** | Keywords for keyword Targeting. Such as `\"keywords\": [\"foo\", \"bar\", \"baz\"]`. | [optional]
|
10
|
+
**url** | **String** | The current page URL | [optional]
|
11
|
+
**referrer** | **String** | The referrer URL | [optional]
|
12
|
+
**ip** | **String** | The IP address. Required for [Geo-Targeting](https://dev.adzerk.com/docs/geo-location) | [optional]
|
13
|
+
**blocked_creatives** | **Array<Integer>** | Numeric creative ids to disregard for ad selection | [optional]
|
14
|
+
**is_mobile** | **Boolean** | If true, only ads containing a single image will be returned | [optional]
|
15
|
+
**include_pricing_data** | **Boolean** | If true, return pricing data for the decision in the response | [optional]
|
16
|
+
**notrack** | **Boolean** | If true, only return ads that are set to honor Do Not Track | [optional]
|
17
|
+
**enable_bot_filtering** | **Boolean** | If making a client-side request, set to true. Defaults to false to ensure a server isn't seen as a bot. See [here](https://dev.adzerk.com/docs/tracking-overview#section-bot-filtering) for more info | [optional]
|
18
|
+
**enable_user_dbip** | **Boolean** | If true, override the IP address of the request with the IP address supplied on the UserKey. If no IP address is found on the UserKey, this will fall back to the IP address on the request. Requires UserDB | [optional]
|
19
|
+
**consent** | [**Object**](.md) | Object that sets the data consent preferences. Other consent settings are available in the GDPR settings documentation. | [optional]
|
20
|
+
**device_id** | **String** | RTB requests only - sets an Identifier for Advertisers (IFA or IDFA) | [optional]
|
21
|
+
|
22
|
+
## Code Sample
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'AdzerkDecisionSdk'
|
26
|
+
|
27
|
+
instance = AdzerkDecisionSdk::DecisionRequest.new(placements: null,
|
28
|
+
user: null,
|
29
|
+
keywords: null,
|
30
|
+
url: null,
|
31
|
+
referrer: null,
|
32
|
+
ip: null,
|
33
|
+
blocked_creatives: null,
|
34
|
+
is_mobile: null,
|
35
|
+
include_pricing_data: null,
|
36
|
+
notrack: null,
|
37
|
+
enable_bot_filtering: null,
|
38
|
+
enable_user_dbip: null,
|
39
|
+
consent: null,
|
40
|
+
device_id: null)
|
41
|
+
```
|
42
|
+
|
43
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# AdzerkDecisionSdk::DecisionResponse
|
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::DecisionResponse.new(user: null,
|
17
|
+
decisions: null,
|
18
|
+
explain: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/Event.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# AdzerkDecisionSdk::Event
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **Integer** | | [optional]
|
8
|
+
**url** | **String** | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'AdzerkDecisionSdk'
|
14
|
+
|
15
|
+
instance = AdzerkDecisionSdk::Event.new(id: null,
|
16
|
+
url: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/GdprConsent.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# AdzerkDecisionSdk::GdprConsent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**user_key** | **String** | | [optional]
|
8
|
+
**consent** | [**Consent**](Consent.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'AdzerkDecisionSdk'
|
14
|
+
|
15
|
+
instance = AdzerkDecisionSdk::GdprConsent.new(user_key: null,
|
16
|
+
consent: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/Placement.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# AdzerkDecisionSdk::Placement
|
2
|
+
|
3
|
+
## Properties
|
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** | [**Object**](.md) | 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**](.md) | 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
|
+
|
24
|
+
## Code Sample
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'AdzerkDecisionSdk'
|
28
|
+
|
29
|
+
instance = AdzerkDecisionSdk::Placement.new(div_name: null,
|
30
|
+
network_id: null,
|
31
|
+
site_id: null,
|
32
|
+
ad_types: null,
|
33
|
+
zone_ids: null,
|
34
|
+
campaign_id: null,
|
35
|
+
flight_id: null,
|
36
|
+
ad_id: null,
|
37
|
+
click_url: null,
|
38
|
+
properties: null,
|
39
|
+
event_ids: null,
|
40
|
+
overrides: null,
|
41
|
+
content_keys: null,
|
42
|
+
count: null,
|
43
|
+
proportionality: null,
|
44
|
+
ecpm_partition: null)
|
45
|
+
```
|
46
|
+
|
47
|
+
|
data/docs/PricingData.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# AdzerkDecisionSdk::PricingData
|
2
|
+
|
3
|
+
## Properties
|
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]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'AdzerkDecisionSdk'
|
17
|
+
|
18
|
+
instance = AdzerkDecisionSdk::PricingData.new(price: null,
|
19
|
+
clear_price: null,
|
20
|
+
revenue: null,
|
21
|
+
rate_type: null,
|
22
|
+
e_cpm: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/docs/Request.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# AdzerkDecisionSdk::Request
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**placements** | [**Array<Placement>**](Placement.md) | One or more Placement objects |
|
8
|
+
**user** | [**User**](User.md) | | [optional]
|
9
|
+
**keywords** | **Array<String>** | Keywords for keyword Targeting. Such as `\"keywords\": [\"foo\", \"bar\", \"baz\"]`. | [optional]
|
10
|
+
**url** | **String** | The current page URL | [optional]
|
11
|
+
**referrer** | **String** | The referrer URL | [optional]
|
12
|
+
**ip** | **String** | The IP address. Required for [Geo-Targeting](https://dev.adzerk.com/docs/geo-location) | [optional]
|
13
|
+
**blocked_creatives** | **Array<Integer>** | Numeric creative ids to disregard for ad selection | [optional]
|
14
|
+
**is_mobile** | **Boolean** | If true, only ads containing a single image will be returned | [optional]
|
15
|
+
**include_pricing_data** | **Boolean** | If true, return pricing data for the decision in the response | [optional]
|
16
|
+
**notrack** | **Boolean** | If true, only return ads that are set to honor Do Not Track | [optional]
|
17
|
+
**enable_bot_filtering** | **Boolean** | If making a client-side request, set to true. Defaults to false to ensure a server isn't seen as a bot. See [here](https://dev.adzerk.com/docs/tracking-overview#section-bot-filtering) for more info | [optional]
|
18
|
+
**enable_user_dbip** | **Boolean** | If true, override the IP address of the request with the IP address supplied on the UserKey. If no IP address is found on the UserKey, this will fall back to the IP address on the request. Requires UserDB | [optional]
|
19
|
+
**consent** | [**RequestConsent**](RequestConsent.md) | | [optional]
|
20
|
+
**device_id** | **String** | RTB requests only - sets an Identifier for Advertisers (IFA or IDFA) | [optional]
|
21
|
+
|
22
|
+
## Code Sample
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'AdzerkDecisionSdk'
|
26
|
+
|
27
|
+
instance = AdzerkDecisionSdk::Request.new(placements: null,
|
28
|
+
user: null,
|
29
|
+
keywords: null,
|
30
|
+
url: null,
|
31
|
+
referrer: null,
|
32
|
+
ip: null,
|
33
|
+
blocked_creatives: null,
|
34
|
+
is_mobile: null,
|
35
|
+
include_pricing_data: null,
|
36
|
+
notrack: null,
|
37
|
+
enable_bot_filtering: null,
|
38
|
+
enable_user_dbip: null,
|
39
|
+
consent: null,
|
40
|
+
device_id: null)
|
41
|
+
```
|
42
|
+
|
43
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# AdzerkDecisionSdk::RequestConsent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**gdpr** | **Boolean** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'AdzerkDecisionSdk'
|
13
|
+
|
14
|
+
instance = AdzerkDecisionSdk::RequestConsent.new(gdpr: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|