adzerk_decision_sdk 1.0.0.pre.beta.10 → 1.0.0.pre.beta.13
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 +4 -4
- data/Gemfile.lock +3 -3
- data/docs/Placement.md +1 -1
- data/lib/adzerk_decision_sdk/client.rb +3 -0
- data/lib/adzerk_decision_sdk/decision_client.rb +16 -0
- data/lib/adzerk_decision_sdk/models/placement.rb +1 -1
- data/lib/adzerk_decision_sdk/pixel_client.rb +2 -1
- data/lib/adzerk_decision_sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f980227757c5cf3aec47586ffe71e96bff0c700672df5ffccb2f02f30af9a340
|
4
|
+
data.tar.gz: 52c2ce9ff50b71a7e3a25fb5cf96e4949ba0e751c40a18c1de9ee8ea9c0d1a1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10a78d49452f5a75e06052f562b23fc6c63e9c353cafe16ce7e62114d4d1836f8e6a6767ae510e684d5e48c0fbdd7aa6df8a73f845d0544ae64c3cb075add732
|
7
|
+
data.tar.gz: 58cd9b05b7fc610c43bc0c3729db531231ee39ef209fb3f3489e64bfebbe54327677ce0daee224272f647365e3dcf9cb49cd75134855af90e73b589b208ee00c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
adzerk_decision_sdk (1.0.0.pre.beta.
|
4
|
+
adzerk_decision_sdk (1.0.0.pre.beta.13)
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
diff-lcs (1.3)
|
14
14
|
ethon (0.15.0)
|
15
15
|
ffi (>= 1.15.0)
|
16
|
-
ffi (1.15.
|
16
|
+
ffi (1.15.5)
|
17
17
|
jaro_winkler (1.5.4)
|
18
18
|
method_source (0.9.2)
|
19
19
|
parallel (1.19.1)
|
@@ -65,4 +65,4 @@ DEPENDENCIES
|
|
65
65
|
rubocop (~> 0.66.0)
|
66
66
|
|
67
67
|
BUNDLED WITH
|
68
|
-
2.
|
68
|
+
2.3.13
|
data/docs/Placement.md
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
| **properties** | **Object** | A map of key/value pairs used for [Custom Targeting](https://dev.adzerk.com/docs/custom-targeting) | [optional] |
|
17
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
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,
|
19
|
+
| **content_keys** | **Hash<String, String>** | A map of key/value pairs used with [ContentDB](https://dev.adzerk.com/docs/contentdb-1). The format is `\"contentKeys\": {\"schema\": \"contentKey\"}` | [optional] |
|
20
20
|
| **count** | **Integer** | (BETA) The number of ads to return per placement. Integer between 1 and 20 | [optional] |
|
21
21
|
| **proportionality** | **Boolean** | (BETA) If true, fills ads in a multi-winner placement in proportion to the flight's goals | [optional] |
|
22
22
|
| **ecpm_partition** | **String** | (BETA) The name of the eCPM Partition that should be used to source eCPM data for auctions | [optional] |
|
@@ -35,6 +35,9 @@ module AdzerkDecisionSdk
|
|
35
35
|
|
36
36
|
api_client = ApiClient.new(configuration)
|
37
37
|
api_client.default_headers['X-Adzerk-Sdk-Version'] = "adzerk-decision-sdk-ruby:#{version}"
|
38
|
+
if api_key
|
39
|
+
api_client.default_headers['X-Adzerk-ApiKey'] = api_key
|
40
|
+
end
|
38
41
|
|
39
42
|
@decisions = DecisionClient.new(network_id, site_id, api_client, configuration.logger)
|
40
43
|
@user_db = UserDbClient.new(network_id, api_client, configuration.logger)
|
@@ -44,6 +44,22 @@ module AdzerkDecisionSdk
|
|
44
44
|
header_params['User-Agent'] = opts[:user_agent] if opts.has_key?(:user_agent)
|
45
45
|
|
46
46
|
if opts.has_key?(:include_explanation) and opts[:include_explanation] == true
|
47
|
+
if opts[:desired_ads]
|
48
|
+
header_object = {
|
49
|
+
api_key: opts[:api_key],
|
50
|
+
desired_ads: opts[:desired_ads]
|
51
|
+
}
|
52
|
+
header_params['X-Adzerk-Explain'] = header_object.to_json
|
53
|
+
end
|
54
|
+
|
55
|
+
if opts[:desired_ad_map]
|
56
|
+
header_object = {
|
57
|
+
api_key: opts[:api_key],
|
58
|
+
desired_ad_map: opts[:desired_ad_map]
|
59
|
+
}
|
60
|
+
header_params['X-Adzerk-Explain'] = header_object.to_json
|
61
|
+
end
|
62
|
+
|
47
63
|
header_params['X-Adzerk-Explain'] = opts[:api_key]
|
48
64
|
@logger.warn("--------------------------------------------------------------")
|
49
65
|
@logger.warn(" !!! WARNING - WARNING - WARNING !!! ")
|
@@ -124,7 +124,7 @@ module AdzerkDecisionSdk
|
|
124
124
|
:'properties' => :'Object',
|
125
125
|
:'event_ids' => :'Array<Integer>',
|
126
126
|
:'overrides' => :'Object',
|
127
|
-
:'content_keys' => :'Hash<String,
|
127
|
+
:'content_keys' => :'Hash<String, String>',
|
128
128
|
:'count' => :'Integer',
|
129
129
|
:'proportionality' => :'Boolean',
|
130
130
|
:'ecpm_partition' => :'String',
|
@@ -8,7 +8,7 @@ module AdzerkDecisionSdk
|
|
8
8
|
@logger = logger
|
9
9
|
end
|
10
10
|
|
11
|
-
def fire(url, revenue_override: nil, additional_revenue: nil, event_multiplier: nil)
|
11
|
+
def fire(url, revenue_override: nil, additional_revenue: nil, event_multiplier: nil, gross_merchandise_value: nil)
|
12
12
|
uri = URI(url)
|
13
13
|
@logger.info("Firing Pixel at base url of: #{uri.to_s}")
|
14
14
|
|
@@ -16,6 +16,7 @@ module AdzerkDecisionSdk
|
|
16
16
|
query_params << ["override", revenue_override] if not revenue_override.nil?
|
17
17
|
query_params << ["additional", additional_revenue] if not additional_revenue.nil?
|
18
18
|
query_params << ["eventMultiplier", event_multiplier] if not event_multiplier.nil?
|
19
|
+
query_params << ["gmv", gross_merchandise_value] if not gross_merchandise_value.nil?
|
19
20
|
uri.query = URI.encode_www_form(query_params)
|
20
21
|
new_url = uri.to_s()
|
21
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adzerk_decision_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adzerk, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|