adzerk 0.23 → 0.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fbe38f271c62aeecfa3bdc94249d5c419dc40efb125524f3fe1ae51db3e7b16
4
- data.tar.gz: 39dbc95fdc5777c81292a528e214651651f577270591782a3b26d5803ae0b558
3
+ metadata.gz: 754298755f117a405c5b758518c171c5b4e35f678c5814c05601128775f642c7
4
+ data.tar.gz: f54bc96ff203f4f73e05dd3bfa00f790558dc90adb21537a2575e7fbdfc293a7
5
5
  SHA512:
6
- metadata.gz: f74a0c3de2a14807c41fdb03934a7bec98075ac2e5213e81bb51e8ed8d7568f85567e561fd4f57b1e5322960566af388293b8d82570476d1ebe08f1bbd34121b
7
- data.tar.gz: 14155f269864e163f95dd0b14bf7e417f2c10efdec53fa14293370c7d1437d0e6717276dcc82ef071cf39384701ec31521bfe7f06dad7d9eb2797d91f03fdb04
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}"
@@ -1,3 +1,3 @@
1
1
  module Adzerk
2
- VERSION = "0.23"
2
+ VERSION = "0.24"
3
3
  end
@@ -11,7 +11,7 @@ describe "Flight API" do
11
11
  @priorities = client.priorities
12
12
 
13
13
  advertiser = @advertisers.create(:title => "test")
14
- $advertiserId = advertiser[:id].to_s
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 => $advertiserId,
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($advertiserId)
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.23'
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: 2021-12-15 00:00:00.000000000 Z
20
+ date: 2022-02-07 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rspec