adzerk 0.23 → 0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adzerk/flight.rb +8 -0
- data/lib/adzerk/version.rb +1 -1
- data/test/flight_api_spec.rb +13 -3
- 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: 754298755f117a405c5b758518c171c5b4e35f678c5814c05601128775f642c7
|
4
|
+
data.tar.gz: f54bc96ff203f4f73e05dd3bfa00f790558dc90adb21537a2575e7fbdfc293a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03fd7e484cd4ce24838cd3fcfd1968d35a84ff3864ea7a6b01676f5504d1a9f8bbf324c0df9e7561dd97c16878ac221ac44ccf0eb7e144b3f99fa07db91e6165
|
7
|
+
data.tar.gz: 3b5852dbd472cc603db4f51d241b1171dd0ff73cc68df85e93e07e37d4afdd938265ca5aed2d1aea4845340885e1de54327632f34300aaf3921f4177f9b4c06b
|
data/lib/adzerk/flight.rb
CHANGED
@@ -31,6 +31,14 @@ module Adzerk
|
|
31
31
|
parse_response(@client.get_request(url))
|
32
32
|
end
|
33
33
|
|
34
|
+
def list_for_advertiser(advertiser_id, is_active = nil)
|
35
|
+
url = "advertiser/#{advertiser_id}/flight"
|
36
|
+
if !is_active.nil?
|
37
|
+
url = "#{url}?isActive=#{is_active}"
|
38
|
+
end
|
39
|
+
parse_response(@client.get_request(url))
|
40
|
+
end
|
41
|
+
|
34
42
|
def filter_flights(data={})
|
35
43
|
query_string = URI.encode_www_form(data)
|
36
44
|
url = "fast/flight?#{query_string}"
|
data/lib/adzerk/version.rb
CHANGED
data/test/flight_api_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe "Flight API" do
|
|
11
11
|
@priorities = client.priorities
|
12
12
|
|
13
13
|
advertiser = @advertisers.create(:title => "test")
|
14
|
-
$
|
14
|
+
$advertiser_id = advertiser[:id].to_s
|
15
15
|
|
16
16
|
channel = @channels.create(:title => 'Test Channel ' + rand(1000000).to_s,
|
17
17
|
:commission => '0.0',
|
@@ -33,7 +33,7 @@ describe "Flight API" do
|
|
33
33
|
:end_date => "12/31/2011",
|
34
34
|
:is_active => false,
|
35
35
|
:price => '10.00',
|
36
|
-
:advertiser_id => $
|
36
|
+
:advertiser_id => $advertiser_id,
|
37
37
|
:flights => [],
|
38
38
|
:is_deleted => false)
|
39
39
|
$campaign_id = campaign[:id]
|
@@ -42,7 +42,7 @@ describe "Flight API" do
|
|
42
42
|
after(:all) do
|
43
43
|
@flights.delete($flight_id_2)
|
44
44
|
@campaigns.delete($campaign_id)
|
45
|
-
@advertisers.delete($
|
45
|
+
@advertisers.delete($advertiser_id)
|
46
46
|
@priorities.delete($priority_id)
|
47
47
|
@channels.delete($channel_id)
|
48
48
|
end
|
@@ -170,6 +170,16 @@ describe "Flight API" do
|
|
170
170
|
expect(flights.length).to be > 0
|
171
171
|
end
|
172
172
|
|
173
|
+
it "should list all flights for a campaign" do
|
174
|
+
flights = @flights.list_for_campaign($campaign_id)
|
175
|
+
expect(flights.length).to be > 0
|
176
|
+
end
|
177
|
+
|
178
|
+
it "should list all flights for an advertiser" do
|
179
|
+
flights = @flights.list_for_advertiser($advertiser_id)
|
180
|
+
expect(flights.length).to be > 0
|
181
|
+
end
|
182
|
+
|
173
183
|
it "should get flight instant counts" do
|
174
184
|
data = {
|
175
185
|
start: "2021-04-04",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adzerk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.24'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kacy Fortner
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
|
-
date:
|
20
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rspec
|