Skip to content

Commit bb21b00

Browse files
author
Nicholas Chen
committed
'add v201511 support for DFP'
1 parent 0788431 commit bb21b00

1,036 files changed

Lines changed: 8330 additions & 8061 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dfp_api/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
0.12.0:
2+
- Removed support for DFP v201408.
3+
- Added support for DFP v201511.
4+
5+
0.11.0:
6+
- Moved FilterStatement under DfpApi module to reduce requires.
7+
- Require google-ads-common 0.11.0 or later from now on.
8+
- Regenerated stubs for DFP.
9+
- Removed support for v201405.
10+
111
0.10.1:
212
- Added support for v201508
313
- Added ReconciliationLineItemReportService.

dfp_api/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,10 @@ respond in gzipped format. All requests are sent uncompressed regardless.
222222

223223
# External dependencies:
224224

225-
External dependencies should be pulled automatically on gem install. Here is the
226-
list though:
225+
The following gem libraries are required:
227226

228-
- Google Ads Common library (google-ads-common);
229-
- Savon 'the heavy metal Ruby SOAP client' (savon).
227+
- google-ads-savon
228+
- google-ads-common
230229

231230
# Docs for Developers
232231

dfp_api/dfp_api.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#:oauth2_state: INSERT_OAUTH2_STATE_HERE
2020
#:oauth2_access_type: INSERT_OAUTH2_ACCESS_TYPE_HERE
2121
#:oauth2_approval_prompt: INSERT_OAUTH2_APPROVAL_PROMPT_HERE
22+
# You can define extra scopes so that you can reuse your refresh token for
23+
# other APIs.
24+
#:oauth2_extra_scopes: [INSERT_EXTRA_SCOPES_HERE]
2225

2326
# Auth parameters for OAUTH2_SERVICE_ACCOUNT method. See:
2427
# https://developers.google.com/accounts/docs/OAuth2ServiceAccount

dfp_api/examples/v201502/activity_group_service/get_active_activity_groups.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# run create_activity_groups.rb.
2121

2222
require 'dfp_api'
23-
require 'dfp_api_statement'
23+
2424

2525
API_VERSION = :v201502
2626

@@ -36,7 +36,7 @@ def get_active_activity_groups()
3636
activity_group_service = dfp.service(:ActivityGroupService, API_VERSION)
3737

3838
# Create a statement to only select active activity groups.
39-
statement = DfpApiStatement::FilterStatement.new(
39+
statement = DfpApi::FilterStatement.new(
4040
'status = :status ORDER BY id ASC',
4141
[
4242
{:key => 'status',
@@ -56,7 +56,7 @@ def get_active_activity_groups()
5656
activity_group[:id], activity_group[:name]]
5757
end
5858
end
59-
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
59+
statement.offset += DfpApi::SUGGESTED_PAGE_LIMIT
6060
end while statement.offset < page[:total_result_set_size]
6161

6262
# Print a footer

dfp_api/examples/v201502/activity_group_service/get_all_activity_groups.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# run create_activity_groups.rb.
2121

2222
require 'dfp_api'
23-
require 'dfp_api_statement'
23+
2424

2525
API_VERSION = :v201502
2626

@@ -36,7 +36,7 @@ def get_all_activity_groups()
3636
activity_group_service = dfp.service(:ActivityGroupService, API_VERSION)
3737

3838
# Create a statement to select all activity groups.
39-
statement = DfpApiStatement::FilterStatement.new('ORDER BY id ASC')
39+
statement = DfpApi::FilterStatement.new('ORDER BY id ASC')
4040

4141
begin
4242
# Get activity groups by statement.
@@ -50,12 +50,12 @@ def get_all_activity_groups()
5050
activity_group[:id], activity_group[:name]]
5151
end
5252
end
53-
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
53+
statement.offset += DfpApi::SUGGESTED_PAGE_LIMIT
5454
end while statement.offset < page[:total_result_set_size]
5555

5656
# Print a footer
5757
if page.include?(:total_result_set_size)
58-
puts "Total number of results: %d" % page[:total_result_set_sizet]
58+
puts "Total number of results: %d" % page[:total_result_set_size]
5959
end
6060
end
6161

dfp_api/examples/v201502/activity_group_service/update_activity_groups.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
require 'dfp_api'
2323

24+
2425
API_VERSION = :v201502
2526

2627
def update_activity_groups()
@@ -39,7 +40,7 @@ def update_activity_groups()
3940
advertiser_company_id = 'INSERT_ADVERTISER_COMPANY_ID_HERE'
4041

4142
# Create statement to select a single activity group.
42-
statement = DfpApiStatement::FilterStatement.new(
43+
statement = DfpApi::FilterStatement.new(
4344
'WHERE id = :id ORDER BY id ASC',
4445
[
4546
{:key => 'id',

dfp_api/examples/v201502/activity_service/get_active_activities.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# run create_activities.rb.
2121

2222
require 'dfp_api'
23-
require 'dfp_api_statement'
23+
2424

2525
API_VERSION = :v201502
2626

@@ -36,7 +36,7 @@ def get_active_activities()
3636
activity_service = dfp.service(:ActivityService, API_VERSION)
3737

3838
# Create a statement to only select active activities.
39-
statement = DfpApiStatement::FilterStatement.new(
39+
statement = DfpApi::FilterStatement.new(
4040
'status = :status ORDER BY id ASC',
4141
[
4242
{:key => 'status',
@@ -56,7 +56,7 @@ def get_active_activities()
5656
activity[:type]]
5757
end
5858
end
59-
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
59+
statement.offset += DfpApi::SUGGESTED_PAGE_LIMIT
6060
end while statement.offset < page[:total_result_set_size]
6161

6262
# Print a footer

dfp_api/examples/v201502/activity_service/get_all_activities.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# run create_activities.rb.
2121

2222
require 'dfp_api'
23-
require 'dfp_api_statement'
23+
2424

2525
API_VERSION = :v201502
2626

@@ -36,7 +36,7 @@ def get_all_activities()
3636
activity_service = dfp.service(:ActivityService, API_VERSION)
3737

3838
# Create a statement to select all activities.
39-
statement = DfpApiStatement::FilterStatement.new('ORDER BY id ASC')
39+
statement = DfpApi::FilterStatement.new('ORDER BY id ASC')
4040

4141
begin
4242
# Get activities by statement.
@@ -50,7 +50,7 @@ def get_all_activities()
5050
activity[:type]]
5151
end
5252
end
53-
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
53+
statement.offset += DfpApi::SUGGESTED_PAGE_LIMIT
5454
end while statement.offset < page[:total_result_set_size]
5555

5656
# Print a footer

dfp_api/examples/v201502/activity_service/update_activities.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# exist, run get_all_activities.rb.
2121

2222
require 'dfp_api'
23-
require 'dfp_api_statement'
23+
2424

2525
API_VERSION = :v201502
2626

@@ -39,7 +39,7 @@ def update_activities()
3939
activity_id = 'INSERT_ACTIVITY_ID_HERE'
4040

4141
# Create statement to select a single activity.
42-
statement = DfpApiStatement::FilterStatement.new(
42+
statement = DfpApi::FilterStatement.new(
4343
'WHERE id = :id ORDER BY id ASC',
4444
[
4545
{:key => 'id',

dfp_api/examples/v201502/audience_segment_service/get_all_audience_segments.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# create_audience_segments.rb.
2121

2222
require 'dfp_api'
23-
require 'dfp_api_statement'
23+
2424

2525
API_VERSION = :v201502
2626

@@ -36,7 +36,7 @@ def get_all_audience_segments()
3636
audience_segment_service = dfp.service(:AudienceSegmentService, API_VERSION)
3737

3838
# Create a statement to select all audience segments.
39-
statement = DfpApiStatement::FilterStatement.new('ORDER BY id ASC')
39+
statement = DfpApi::FilterStatement.new('ORDER BY id ASC')
4040

4141
begin
4242
# Get audience segments by statement.
@@ -50,7 +50,7 @@ def get_all_audience_segments()
5050
segment[:id], segment[:name], segment[:size]]
5151
end
5252
end
53-
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
53+
statement.offset += DfpApi::SUGGESTED_PAGE_LIMIT
5454
end while statement.offset < page[:total_result_set_size]
5555

5656
# Print a footer

0 commit comments

Comments
 (0)