Skip to content

Commit

Permalink
[sc-28915] Add list ads and creatives for network
Browse files Browse the repository at this point in the history
  • Loading branch information
Callie Bensel authored and calliebensel committed Apr 20, 2022
1 parent c627c94 commit 045a039
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/adzerk/creative.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ def list(advertiserId, page: 1, pageSize: 500)
parse_response(@client.get_request(url))
end

def list_for_network(page: 1, pageSize: 500)
url = "creative?page=#{page}&pageSize=#{pageSize}"
parse_response(@client.get_request(url))
end
end
end
5 changes: 5 additions & 0 deletions lib/adzerk/creative_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def list(flight_id, page: 1, pageSize: 500)
parse_response(@client.get_request(url))
end

def list_for_network(page: 1, pageSize: 500)
url = "ad?page=#{page}&#pageSize=#{pageSize}"
parse_response(@client.get_request(url))
end

def update(data={})
url = "flight/#{data[:flight_id]}/creative/#{data[:id]}"
data = { 'creative' => camelize_data(data).to_json }
Expand Down

0 comments on commit 045a039

Please sign in to comment.