bing-ads-api 0.1.0
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.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +92 -0
- data/Rakefile +38 -0
- data/lib/bing-ads-api.rb +38 -0
- data/lib/bing-ads-api.yml +345 -0
- data/lib/bing-ads-api/api_exception.rb +42 -0
- data/lib/bing-ads-api/client_proxy.rb +131 -0
- data/lib/bing-ads-api/config.rb +75 -0
- data/lib/bing-ads-api/constants.rb +133 -0
- data/lib/bing-ads-api/data/ad.rb +119 -0
- data/lib/bing-ads-api/data/ad_group.rb +121 -0
- data/lib/bing-ads-api/data/campaign.rb +40 -0
- data/lib/bing-ads-api/data/report_request.rb +78 -0
- data/lib/bing-ads-api/data/report_request_status.rb +48 -0
- data/lib/bing-ads-api/data/reporting/account_performance_report_request.rb +176 -0
- data/lib/bing-ads-api/data/reporting/campaign_performance_report_request.rb +186 -0
- data/lib/bing-ads-api/data/reporting/helpers/column_helper.rb +65 -0
- data/lib/bing-ads-api/data/reporting/helpers/filter_helper.rb +124 -0
- data/lib/bing-ads-api/data/reporting/helpers/scope_helper.rb +51 -0
- data/lib/bing-ads-api/data/reporting/helpers/time_helper.rb +69 -0
- data/lib/bing-ads-api/data/reporting/performance_report_request.rb +78 -0
- data/lib/bing-ads-api/data_object.rb +35 -0
- data/lib/bing-ads-api/fault/ad_api_error.rb +15 -0
- data/lib/bing-ads-api/fault/ad_api_fault_detail.rb +67 -0
- data/lib/bing-ads-api/fault/api_fault_detail.rb +97 -0
- data/lib/bing-ads-api/fault/application_fault.rb +18 -0
- data/lib/bing-ads-api/fault/batch_error.rb +47 -0
- data/lib/bing-ads-api/fault/operation_error.rb +22 -0
- data/lib/bing-ads-api/fault/partial_errors.rb +75 -0
- data/lib/bing-ads-api/service.rb +174 -0
- data/lib/bing-ads-api/service/campaign_management.rb +483 -0
- data/lib/bing-ads-api/service/reporting.rb +101 -0
- data/lib/bing-ads-api/soap_hasheable.rb +143 -0
- data/lib/bing-ads-api/version.rb +6 -0
- data/lib/locales/es.yml +174 -0
- data/lib/tasks/bing-ads-api_tasks.rake +4 -0
- data/test/bing-ads-api_test.rb +134 -0
- data/test/campaign_management_test.rb +463 -0
- data/test/data_object_test.rb +46 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +56 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +29 -0
- data/test/dummy/log/test.log +3264 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/report_request_test.rb +312 -0
- data/test/reporting_test.rb +145 -0
- data/test/test_helper.rb +11 -0
- metadata +205 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
= BingAdsApi
|
2
|
+
|
3
|
+
This project rocks and uses MIT-LICENSE.
|
4
|
+
|
5
|
+
== Presentation
|
6
|
+
|
7
|
+
This is a very simple, straight use gem for integrating any Rails app with the
|
8
|
+
Bing Ads SOAP Webservices.
|
9
|
+
|
10
|
+
== Installation
|
11
|
+
|
12
|
+
Add to your Gemfile
|
13
|
+
gem 'bing-ads-api'
|
14
|
+
|
15
|
+
== Examples
|
16
|
+
So far, I've just integrated some methods from +CampaignManagement+ and +Reporting+ services
|
17
|
+
|
18
|
+
|
19
|
+
=== Authentication
|
20
|
+
|
21
|
+
In all cases, you must initialize some service object with the authentication options
|
22
|
+
Here's an example with the CampaignMangement service object
|
23
|
+
|
24
|
+
options = {
|
25
|
+
:environment => :sandbox,
|
26
|
+
:username => "desarrollo_neonline",
|
27
|
+
:password => "neonline2013",
|
28
|
+
:developer_token => "BBD37VB98",
|
29
|
+
:customer_id => "21021746",
|
30
|
+
:account_id => "5978083"
|
31
|
+
}
|
32
|
+
service = BingAdsApi::CampaignManagement.new(options)
|
33
|
+
|
34
|
+
* +environment+ can be one of two values: +:sandbox+ or +:production+
|
35
|
+
|
36
|
+
|
37
|
+
=== Campaign Management
|
38
|
+
|
39
|
+
Example of service object initialization:
|
40
|
+
options = {
|
41
|
+
:environment => :sandbox,
|
42
|
+
:username => "desarrollo_neonline",
|
43
|
+
:password => "neonline2013",
|
44
|
+
:developer_token => "BBD37VB98",
|
45
|
+
:customer_id => "21021746",
|
46
|
+
:account_id => "5978083"
|
47
|
+
}
|
48
|
+
service = BingAdsApi::CampaignManagement.new(options)
|
49
|
+
|
50
|
+
|
51
|
+
==== Adding Campaigns
|
52
|
+
|
53
|
+
account_id = 123456789
|
54
|
+
campaigns = [
|
55
|
+
BingAdsApi::Campaign.new(
|
56
|
+
:budget_type => BingAdsApi::Campaign::DAILY_BUDGET_STANDARD,
|
57
|
+
:conversion_tracking_enabled => "false",
|
58
|
+
:daily_budget => 2000,
|
59
|
+
:daylight_saving => "false",
|
60
|
+
:description => name + " first description",
|
61
|
+
:monthly_budget => 5400,
|
62
|
+
:name => name + " first name",
|
63
|
+
:status => BingAdsApi::Campaign::PAUSED,
|
64
|
+
:time_zone => BingAdsApi::Campaign::SANTIAGO),
|
65
|
+
|
66
|
+
BingAdsApi::Campaign.new(
|
67
|
+
:budget_type => BingAdsApi::Campaign::DAILY_BUDGET_STANDARD,
|
68
|
+
:conversion_tracking_enabled => "false",
|
69
|
+
:daily_budget => 2500,
|
70
|
+
:daylight_saving => "false",
|
71
|
+
:description => name + " second description",
|
72
|
+
:monthly_budget => 7800,
|
73
|
+
:name => name + " second name",
|
74
|
+
:status => BingAdsApi::Campaign::PAUSED,
|
75
|
+
:time_zone => BingAdsApi::Campaign::SANTIAGO) ]
|
76
|
+
response = service.add_campaigns(account_id, campaigns)
|
77
|
+
|
78
|
+
In some cases the methods will return a Hash with the 'response' tag according
|
79
|
+
to the method invoked. Like the example above.
|
80
|
+
|
81
|
+
|
82
|
+
==== Find Campaigns
|
83
|
+
|
84
|
+
In other cases, like this next example, the method will return an object, like an array or
|
85
|
+
a object representation of the hash
|
86
|
+
campaigns = service.get_campaigns_by_account_id(123456789)
|
87
|
+
# => campaigns is an array of BingAdsApi::Campaign
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
=== Reporting
|
92
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'BingAdsApi'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
Bundler::GemHelper.install_tasks
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
|
30
|
+
Rake::TestTask.new(:test) do |t|
|
31
|
+
t.libs << 'lib'
|
32
|
+
t.libs << 'test'
|
33
|
+
t.pattern = 'test/**/*_test.rb'
|
34
|
+
t.verbose = false
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
task :default => :test
|
data/lib/bing-ads-api.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
require 'savon'
|
4
|
+
require 'bing-ads-api/api_exception'
|
5
|
+
require 'bing-ads-api/config'
|
6
|
+
require 'bing-ads-api/constants'
|
7
|
+
require 'bing-ads-api/service'
|
8
|
+
require 'bing-ads-api/client_proxy'
|
9
|
+
require 'bing-ads-api/soap_hasheable'
|
10
|
+
require 'bing-ads-api/data_object'
|
11
|
+
|
12
|
+
|
13
|
+
# Require services
|
14
|
+
Dir[File.join(File.dirname(__FILE__), 'bing-ads-api', 'service', '*.rb')].each { |file| require file }
|
15
|
+
|
16
|
+
# Require data objects
|
17
|
+
Dir[File.join(File.dirname(__FILE__), 'bing-ads-api', 'data', '*.rb')].each { |file| require file }
|
18
|
+
|
19
|
+
# Require Fault objects
|
20
|
+
Dir[File.join(File.dirname(__FILE__), 'bing-ads-api', 'fault', '*.rb')].each { |file| require file }
|
21
|
+
|
22
|
+
# Require Reporting helper objects
|
23
|
+
Dir[File.join(File.dirname(__FILE__), 'bing-ads-api', 'data', 'reporting', 'helpers', '*.rb')].each { |file| require file }
|
24
|
+
|
25
|
+
# Require report request data objects
|
26
|
+
require 'bing-ads-api/data/reporting/performance_report_request'
|
27
|
+
require 'bing-ads-api/data/reporting/account_performance_report_request'
|
28
|
+
require 'bing-ads-api/data/reporting/campaign_performance_report_request'
|
29
|
+
# require 'bing-ads-api/data/reporting/ad_group_performance_report_request'
|
30
|
+
# require 'bing-ads-api/data/reporting/ad_performance_report_request'
|
31
|
+
|
32
|
+
# Public : This is the main namespace for all classes and submodules in this BingAdsApi Gem
|
33
|
+
#
|
34
|
+
# Author:: jlopezn@neonline.cl
|
35
|
+
module BingAdsApi
|
36
|
+
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,345 @@
|
|
1
|
+
##################################
|
2
|
+
## Constant values for Bing Api ##
|
3
|
+
##################################
|
4
|
+
|
5
|
+
|
6
|
+
# WSDL URL for services
|
7
|
+
# Default defines sandbox urls. For production, check 'production.wsdl' key
|
8
|
+
wsdl:
|
9
|
+
sandbox:
|
10
|
+
campaign_management: "https://api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
|
11
|
+
reporting: "https://api.sandbox.bingads.microsoft.com/Api/Advertiser/Reporting/V9/ReportingService.svc?singleWsdl"
|
12
|
+
production:
|
13
|
+
campaign_management: "https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
|
14
|
+
reporting: "https://api.bingads.microsoft.com/Api/Advertiser/Reporting/V9/ReportingService.svc?singleWsdl"
|
15
|
+
|
16
|
+
# All major constants are here
|
17
|
+
# In general the key and value are the same. Key in snake_case (ruby-like) and value in CamelCase (Bing alike)
|
18
|
+
constants:
|
19
|
+
# Common constants: Time zones, ad_languages (names and codes). For 'market country' check the locales file
|
20
|
+
common:
|
21
|
+
time_zones:
|
22
|
+
abu_dhabi_muscat: 'AbuDhabiMuscat'
|
23
|
+
adelaide: 'Adelaide'
|
24
|
+
alaska: 'Alaska'
|
25
|
+
almaty_novosibirsk: 'Almaty_Novosibirsk'
|
26
|
+
amsterdam_berlin_bern_rome_stockholm_vienna: 'AmsterdamBerlinBernRomeStockholmVienna'
|
27
|
+
arizona: 'Arizona'
|
28
|
+
astana_dhaka: 'AstanaDhaka'
|
29
|
+
athens_buckarest_istanbul: 'AthensBuckarestIstanbul'
|
30
|
+
atlantic_time_canada: 'AtlanticTimeCanada'
|
31
|
+
auckland_wellington: 'AucklandWellington'
|
32
|
+
azores: 'Azores'
|
33
|
+
baghdad: 'Baghdad'
|
34
|
+
baku_tbilisi_yerevan: 'BakuTbilisiYerevan'
|
35
|
+
bangkok_hanoi_jakarta: 'BangkokHanoiJakarta'
|
36
|
+
beijing_chongqing_hong_kong_urumqi: 'BeijingChongqingHongKongUrumqi'
|
37
|
+
belgrade_bratislava_budapest_ljubljana_prague: 'BelgradeBratislavaBudapestLjubljanaPrague'
|
38
|
+
bogota_lima_quito: 'BogotaLimaQuito'
|
39
|
+
brasilia: 'Brasilia'
|
40
|
+
brisbane: 'Brisbane'
|
41
|
+
brussels_copenhagen_madrid_paris: 'BrusselsCopenhagenMadridParis'
|
42
|
+
bucharest: 'Bucharest'
|
43
|
+
buenos_aires_georgetown: 'BuenosAiresGeorgetown'
|
44
|
+
cairo: 'Cairo'
|
45
|
+
canberra_melbourne_sydney: 'CanberraMelbourneSydney'
|
46
|
+
cape_verde_island: 'CapeVerdeIsland'
|
47
|
+
caracas_la_paz: 'CaracasLaPaz'
|
48
|
+
casablanca_monrovia: 'CasablancaMonrovia'
|
49
|
+
central_america: 'CentralAmerica'
|
50
|
+
central_time_u_s_canada: 'CentralTimeUSCanada'
|
51
|
+
chennai_kolkata_mumbai_new_delhi: 'ChennaiKolkataMumbaiNewDelhi'
|
52
|
+
chihuahua_la_paz_mazatlan: 'ChihuahuaLaPazMazatlan'
|
53
|
+
darwin: 'Darwin'
|
54
|
+
eastern_time_u_s_canada: 'EasternTimeUSCanada'
|
55
|
+
ekaterinburg: 'Ekaterinburg'
|
56
|
+
fiji_kamchatka_marshall_island: 'FijiKamchatkaMarshallIsland'
|
57
|
+
greenland: 'Greenland'
|
58
|
+
greenwich_mean_time_dublin_edinburgh_lisbon_london: 'GreenwichMeanTimeDublinEdinburghLisbonLondon'
|
59
|
+
guadalajara_mexico_city_monterrey: 'GuadalajaraMexicoCityMonterrey'
|
60
|
+
guam_port_moresby: 'GuamPortMoresby'
|
61
|
+
harare_pretoria: 'HararePretoria'
|
62
|
+
hawaii: 'Hawaii'
|
63
|
+
helsinki_kyiv_riga_sofia_tallinn_vilnius: 'HelsinkiKyivRigaSofiaTallinnVilnius'
|
64
|
+
hobart: 'Hobart'
|
65
|
+
indiana_east: 'IndianaEast'
|
66
|
+
international_date_line_west: 'InternationalDateLineWest'
|
67
|
+
irkutsk_ulaan_bataar: 'IrkutskUlaanBataar'
|
68
|
+
islandamabad_karachi_tashkent: 'IslandamabadKarachiTashkent'
|
69
|
+
jerusalem: 'Jerusalem'
|
70
|
+
kabul: 'Kabul'
|
71
|
+
kathmandu: 'Kathmandu'
|
72
|
+
krasnoyarsk: 'Krasnoyarsk'
|
73
|
+
kuala_lumpur_singapore: 'KualaLumpurSingapore'
|
74
|
+
kuwait_riyadh: 'KuwaitRiyadh'
|
75
|
+
magadan_solomon_island_new_caledonia: 'MagadanSolomonIslandNewCaledonia'
|
76
|
+
mid_atlantic: 'MidAtlantic'
|
77
|
+
midway_islandand_samoa: 'MidwayIslandand_Samoa'
|
78
|
+
moscow_st_petersburg_volgograd: 'MoscowStPetersburgVolgograd'
|
79
|
+
mountain_time_u_s_canada: 'MountainTime_US_Canada'
|
80
|
+
nairobi: 'Nairobi'
|
81
|
+
newfoundland: 'Newfoundland'
|
82
|
+
nukualofa: 'Nukualofa'
|
83
|
+
osaka_sapporo_tokyo: 'OsakaSapporoTokyo'
|
84
|
+
pacific_time_u_s_canada_tijuana: 'PacificTimeUSCanadaTijuana'
|
85
|
+
perth: 'Perth'
|
86
|
+
rangoon: 'Rangoon'
|
87
|
+
santiago: 'Santiago'
|
88
|
+
sarajevo_skopje_warsaw_zagreb: 'SarajevoSkopjeWarsawZagreb'
|
89
|
+
saskatchewan: 'Saskatchewan'
|
90
|
+
seoul: 'Seoul'
|
91
|
+
sri_jayawardenepura: 'SriJayawardenepura'
|
92
|
+
taipei: 'Taipei'
|
93
|
+
tehran: 'Tehran'
|
94
|
+
vladivostok: 'Vladivostok'
|
95
|
+
west_central_africa: 'WestCentralAfrica'
|
96
|
+
yakutsk: 'Yakutsk'
|
97
|
+
# Ad Languages names
|
98
|
+
ad_languages:
|
99
|
+
danish: 'Danish'
|
100
|
+
dutch: 'Dutch'
|
101
|
+
english: 'English'
|
102
|
+
finnish: 'Finnish'
|
103
|
+
french: 'French'
|
104
|
+
german: 'German'
|
105
|
+
italian: 'Italian'
|
106
|
+
norwegian: 'Norwegian'
|
107
|
+
portuguese: 'Portuguese'
|
108
|
+
spanish: 'Spanish'
|
109
|
+
swedish: 'Swedish'
|
110
|
+
traditional_chinese: 'Traditional Chinese'
|
111
|
+
# Ad languages codes
|
112
|
+
codes:
|
113
|
+
danish: 'DA'
|
114
|
+
dutch: 'NL'
|
115
|
+
english: 'EN'
|
116
|
+
finnish: 'FI'
|
117
|
+
french: 'FR'
|
118
|
+
german: 'DE'
|
119
|
+
italian: 'IT'
|
120
|
+
norwegian: 'NO'
|
121
|
+
portuguese: 'PT'
|
122
|
+
spanish: 'ES'
|
123
|
+
swedish: 'SV'
|
124
|
+
traditional_chinese: 'ZH'
|
125
|
+
|
126
|
+
# Constansts specific for campaign management services
|
127
|
+
campaign_management:
|
128
|
+
budget_limit_type:
|
129
|
+
monthly_budget_spend_until_depleted: 'MonthlyBudgetSpendUntilDepleted'
|
130
|
+
daily_budget_accelerated: 'DailyBudgetAccelerated'
|
131
|
+
daily_budget_standard: 'DailyBudgetStandard'
|
132
|
+
campaign_status:
|
133
|
+
active: 'Active'
|
134
|
+
paused: 'Paused'
|
135
|
+
budget_paused: 'BudgetPaused'
|
136
|
+
budget_and_manual_paused: 'BudgetAndManualPaused'
|
137
|
+
deleted: 'Deleted'
|
138
|
+
ad_distribution:
|
139
|
+
search: 'Search'
|
140
|
+
content: 'Content'
|
141
|
+
ad_rotation_type:
|
142
|
+
optimize_for_clicks: 'OptimizeForClicks'
|
143
|
+
rotate_ads_evenly: 'RotateAdsEvenly'
|
144
|
+
bidding_model:
|
145
|
+
keyword: 'Keyword'
|
146
|
+
site_placement: 'SitePlacement'
|
147
|
+
pricing_model:
|
148
|
+
cpc: 'Cpc'
|
149
|
+
cpm: 'Cpm'
|
150
|
+
ad_group_status:
|
151
|
+
draft: 'Draft'
|
152
|
+
active: 'Active'
|
153
|
+
paused: 'Paused'
|
154
|
+
deleted: 'Deleted'
|
155
|
+
ad_editorial_status:
|
156
|
+
active: 'Active'
|
157
|
+
disapproved: 'Disapproved'
|
158
|
+
inactive: 'Inactive'
|
159
|
+
active_limited: 'ActiveLimited'
|
160
|
+
ad_status:
|
161
|
+
inactive: 'Inactive'
|
162
|
+
active: 'Active'
|
163
|
+
paused: 'Paused'
|
164
|
+
deleted: 'Deleted'
|
165
|
+
ad_type:
|
166
|
+
text: 'Text'
|
167
|
+
image: 'Image'
|
168
|
+
mobile: 'Mobile'
|
169
|
+
rich_search: 'RichSearch'
|
170
|
+
product: 'Product'
|
171
|
+
keyword_editorial_statuses:
|
172
|
+
active: 'Active'
|
173
|
+
disapproved: 'Disapproved'
|
174
|
+
inactive: 'Inactive'
|
175
|
+
keyword_statuses:
|
176
|
+
active: 'Active'
|
177
|
+
paused: 'Paused'
|
178
|
+
deleted: 'Deleted'
|
179
|
+
inactive: 'Inactive'
|
180
|
+
# Constants specific for reporting services
|
181
|
+
reporting:
|
182
|
+
format:
|
183
|
+
csv: 'Csv'
|
184
|
+
tsv: 'Tsv'
|
185
|
+
xml: 'Xml'
|
186
|
+
language:
|
187
|
+
english: 'English'
|
188
|
+
french: 'French'
|
189
|
+
request_status_type:
|
190
|
+
Error: 'Error'
|
191
|
+
Success: 'Success'
|
192
|
+
Pending: 'Pending'
|
193
|
+
aggregation:
|
194
|
+
summary: 'Summary'
|
195
|
+
hourly: 'Hourly'
|
196
|
+
daily: 'Daily'
|
197
|
+
weekly: 'Weekly'
|
198
|
+
monthly: 'Monthly'
|
199
|
+
yearly: 'Yearly'
|
200
|
+
hour_of_day: 'HourOfDay'
|
201
|
+
day_of_week: 'DayOfWeek'
|
202
|
+
time_periods:
|
203
|
+
today: 'Today'
|
204
|
+
yesterday: 'Yesterday'
|
205
|
+
last_seven_days: 'LastSevenDays'
|
206
|
+
this_week: 'ThisWeek'
|
207
|
+
last_week: 'LastWeek'
|
208
|
+
last_four_weeks: 'LastFourWeeks'
|
209
|
+
this_month: 'ThisMonth'
|
210
|
+
last_month: 'LastMonth'
|
211
|
+
last_three_months: 'LastThreeMonths'
|
212
|
+
last_six_months: 'LastSixMonths'
|
213
|
+
this_year: 'ThisYear'
|
214
|
+
last_year: 'LastYear'
|
215
|
+
filters:
|
216
|
+
ad_distribution:
|
217
|
+
search: 'Search'
|
218
|
+
content: 'Content'
|
219
|
+
device_os:
|
220
|
+
other: 'Other'
|
221
|
+
windows: 'Windows'
|
222
|
+
ios: 'iOS'
|
223
|
+
android: 'Android'
|
224
|
+
black_berry: 'BlackBerry'
|
225
|
+
device_type:
|
226
|
+
computer: 'Computer'
|
227
|
+
smart_phone: 'SmartPhone'
|
228
|
+
non_smart_phone: 'NonSmartPhone'
|
229
|
+
tablet: 'Tablet'
|
230
|
+
campaign_status:
|
231
|
+
submited: 'Submited'
|
232
|
+
cancelled: 'Cancelled'
|
233
|
+
deleted: 'Deleted'
|
234
|
+
paused: 'Paused'
|
235
|
+
budget_paused: 'BudgetPaused'
|
236
|
+
active: 'Active'
|
237
|
+
# From here the constants are specific per ReportRequest derive
|
238
|
+
# This includes columns, filters and scopes (if any)
|
239
|
+
account_performance_report:
|
240
|
+
# 'type' represents the value for 'type' attribute in <ReportRequeset> tag for the request XML
|
241
|
+
type: "AccountPerformanceReportRequest"
|
242
|
+
# 'columns' names for <Columns> tag
|
243
|
+
columns:
|
244
|
+
account_name: "AccountName"
|
245
|
+
account_number: "AccountNumber"
|
246
|
+
time_period: "TimePeriod"
|
247
|
+
currency_code: "CurrencyCode"
|
248
|
+
ad_distribution: "AdDistribution"
|
249
|
+
impressions: "Impressions"
|
250
|
+
clicks: "Clicks"
|
251
|
+
ctr: "Ctr"
|
252
|
+
average_cpc: "AverageCpc"
|
253
|
+
spend: "Spend"
|
254
|
+
average_position: "AveragePosition"
|
255
|
+
conversions: "Conversions"
|
256
|
+
conversion_rate: "ConversionRate"
|
257
|
+
cost_per_conversion: "CostPerConversion"
|
258
|
+
low_quality_clicks: "LowQualityClicks"
|
259
|
+
low_quality_clicks_percent: "LowQualityClicksPercent"
|
260
|
+
low_quality_impressions: "LowQualityImpressions"
|
261
|
+
low_quality_impressions_percent: "LowQualityImpressionsPercent"
|
262
|
+
low_quality_conversions: "LowQualityConversions"
|
263
|
+
low_quality_conversion_rate: "LowQualityConversionRate"
|
264
|
+
average_cpm: "AverageCpm"
|
265
|
+
device_type: "DeviceType"
|
266
|
+
device_o_s: "DeviceOS"
|
267
|
+
impression_share_percent: "ImpressionSharePercent"
|
268
|
+
impression_lost_to_budget_percent: "ImpressionLostToBudgetPercent"
|
269
|
+
impression_lost_to_rank_percent: "ImpressionLostToRankPercent"
|
270
|
+
impression_lost_to_bid_percent: "ImpressionLostToBidPercent"
|
271
|
+
impression_lost_to_landing_page_relevance_percent: "ImpressionLostToLandingPageRelevancePercent"
|
272
|
+
impression_lost_to_keyword_relevance_percent: "ImpressionLostToKeywordRelevancePercent"
|
273
|
+
phone_impressions: "PhoneImpressions"
|
274
|
+
phone_calls: "PhoneCalls"
|
275
|
+
manual_calls: "ManualCalls"
|
276
|
+
click_calls: "ClickCalls"
|
277
|
+
ptr: "Ptr"
|
278
|
+
phone_spend: "PhoneSpend"
|
279
|
+
average_cpp: "AverageCpp"
|
280
|
+
total_cost_phone_and_clicks: "TotalCostPhoneAndClicks"
|
281
|
+
network: "Network"
|
282
|
+
top_vs_other: "TopVsOther"
|
283
|
+
# 'filter' for the <Filter> tag in Request XML
|
284
|
+
filter:
|
285
|
+
ad_distribution: "AdDistribution"
|
286
|
+
device_os: "DeviceOS"
|
287
|
+
device_type: "DeviceType"
|
288
|
+
campaign_performance_report:
|
289
|
+
type: "CampaignPerformanceReportRequest"
|
290
|
+
columns:
|
291
|
+
account_name: "AccountName"
|
292
|
+
account_number: "AccountNumber"
|
293
|
+
time_period: "TimePeriod"
|
294
|
+
status: "Status"
|
295
|
+
campaign_name: "CampaignName"
|
296
|
+
campaign_id: "CampaignId"
|
297
|
+
currency_code: "CurrencyCode"
|
298
|
+
ad_distribution: "AdDistribution"
|
299
|
+
impressions: "Impressions"
|
300
|
+
clicks: "Clicks"
|
301
|
+
ctr: "Ctr"
|
302
|
+
average_cpc: "AverageCpc"
|
303
|
+
spend: "Spend"
|
304
|
+
average_position: "AveragePosition"
|
305
|
+
conversions: "Conversions"
|
306
|
+
conversion_rate: "ConversionRate"
|
307
|
+
cost_per_conversion: "CostPerConversion"
|
308
|
+
low_quality_clicks: "LowQualityClicks"
|
309
|
+
low_quality_clicks_percent: "LowQualityClicksPercent"
|
310
|
+
low_quality_impressions: "LowQualityImpressions"
|
311
|
+
low_quality_impressions_percent: "LowQualityImpressionsPercent"
|
312
|
+
low_quality_conversions: "LowQualityConversions"
|
313
|
+
low_quality_conversion_rate: "LowQualityConversionRate"
|
314
|
+
average_cpm: "AverageCpm"
|
315
|
+
device_type: "DeviceType"
|
316
|
+
device_o_s: "DeviceOS"
|
317
|
+
impression_share_percent: "ImpressionSharePercent"
|
318
|
+
impression_lost_to_budget_percent: "ImpressionLostToBudgetPercent"
|
319
|
+
impression_lost_to_rank_percent: "ImpressionLostToRankPercent"
|
320
|
+
quality_score: "QualityScore"
|
321
|
+
keyword_relevance: "KeywordRelevance"
|
322
|
+
landing_page_relevance: "LandingPageRelevance"
|
323
|
+
landing_page_user_experience: "LandingPageUserExperience"
|
324
|
+
historic_quality_score: "HistoricQualityScore"
|
325
|
+
historic_keyword_relevance: "HistoricKeywordRelevance"
|
326
|
+
historic_landing_page_relevance: "HistoricLandingPageRelevance"
|
327
|
+
historic_landing_page_user_experience: "HistoricLandingPageUserExperience"
|
328
|
+
impression_lost_to_bid_percent: "ImpressionLostToBidPercent"
|
329
|
+
impression_lost_to_landing_page_relevance_percent: "ImpressionLostToLandingPageRelevancePercent"
|
330
|
+
impression_lost_to_keyword_relevance_percent: "ImpressionLostToKeywordRelevancePercent"
|
331
|
+
phone_impressions: "PhoneImpressions"
|
332
|
+
phone_calls: "PhoneCalls"
|
333
|
+
manual_calls: "ManualCalls"
|
334
|
+
click_calls: "ClickCalls"
|
335
|
+
ptr: "Ptr"
|
336
|
+
phone_spend: "PhoneSpend"
|
337
|
+
average_cpp: "AverageCpp"
|
338
|
+
total_cost_phone_and_clicks: "TotalCostPhoneAndClicks"
|
339
|
+
network: "Network"
|
340
|
+
top_vs_other: "TopVsOther"
|
341
|
+
filter:
|
342
|
+
ad_distribution: "AdDistribution"
|
343
|
+
device_os: "DeviceOS"
|
344
|
+
device_type: "DeviceType"
|
345
|
+
status: "Status"
|