sem4r 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +22 -0
- data/README.rdoc +74 -0
- data/Rakefile +126 -0
- data/VERSION.yml +5 -0
- data/bin/sem +34 -0
- data/config/sem4r.example.yml +51 -0
- data/examples_blog/2009-11-29-hello-world.rb +12 -0
- data/examples_blog/2009-12-12-create-campaign.rb +29 -0
- data/examples_blog/2010-02-06-constants-scope.rb +8 -0
- data/examples_blog/2010-02-07-ad-parameters.rb +47 -0
- data/examples_sem4r/01_get_account.rb +37 -0
- data/examples_sem4r/02_get_info.rb +32 -0
- data/examples_sem4r/03_list_ad.rb +47 -0
- data/examples_sem4r/04_list_keywords.rb +54 -0
- data/examples_sem4r/05_request_report.rb +51 -0
- data/examples_sem4r/05_request_report_2010.rb +40 -0
- data/examples_sem4r/06_create_campaigns.rb +86 -0
- data/examples_sem4r/07_create_campaigns_block.rb +99 -0
- data/examples_sem4r/07_create_campaigns_simple.rb +65 -0
- data/examples_sem4r/08_ad_params.rb +70 -0
- data/examples_sem4r/09_targeting_idea.rb +59 -0
- data/examples_sem4r/10_get_location.rb +28 -0
- data/examples_sem4r/11_submit_bulk_job.rb +82 -0
- data/examples_sem4r/12_list_bulk_job.rb +29 -0
- data/examples_sem4r/30_prune_empty_adgroup.rb +50 -0
- data/examples_sem4r/31_empty_accounts.rb +40 -0
- data/examples_sem4r/example_helper.rb +115 -0
- data/lib/sem4r/account.rb +349 -0
- data/lib/sem4r/ad_extension_override/ad_extension_override_service.rb +30 -0
- data/lib/sem4r/ad_group/ad_group.rb +340 -0
- data/lib/sem4r/ad_group/ad_group_bids.rb +170 -0
- data/lib/sem4r/ad_group/ad_group_service.rb +75 -0
- data/lib/sem4r/ad_group/mobile_ad_image.rb +33 -0
- data/lib/sem4r/ad_group_ad/ad_group_ad.rb +98 -0
- data/lib/sem4r/ad_group_ad/ad_group_ad_operations.rb +38 -0
- data/lib/sem4r/ad_group_ad/ad_group_ad_service.rb +56 -0
- data/lib/sem4r/ad_group_ad/ad_group_mobile_ad.rb +137 -0
- data/lib/sem4r/ad_group_ad/ad_group_text_ad.rb +98 -0
- data/lib/sem4r/ad_group_criterion/ad_group_criterion.rb +144 -0
- data/lib/sem4r/ad_group_criterion/ad_group_criterion_bids.rb +115 -0
- data/lib/sem4r/ad_group_criterion/ad_group_criterion_operations.rb +35 -0
- data/lib/sem4r/ad_group_criterion/ad_group_criterion_service.rb +58 -0
- data/lib/sem4r/ad_group_criterion/criterion.rb +67 -0
- data/lib/sem4r/ad_group_criterion/criterion_keyword.rb +80 -0
- data/lib/sem4r/ad_group_criterion/criterion_placement.rb +66 -0
- data/lib/sem4r/ad_param/ad_param.rb +96 -0
- data/lib/sem4r/ad_param/ad_param_operation.rb +34 -0
- data/lib/sem4r/ad_param/ad_param_service.rb +59 -0
- data/lib/sem4r/adwords.rb +242 -0
- data/lib/sem4r/api_counters.rb +7 -0
- data/lib/sem4r/base.rb +43 -0
- data/lib/sem4r/bulk_mutate_job/bulk_mutate_job.rb +108 -0
- data/lib/sem4r/bulk_mutate_job/bulk_mutate_job_selector.rb +56 -0
- data/lib/sem4r/bulk_mutate_job/bulk_mutate_job_service.rb +57 -0
- data/lib/sem4r/bulk_mutate_job/job_operations.rb +35 -0
- data/lib/sem4r/campaign/campaign.rb +193 -0
- data/lib/sem4r/campaign/campaign_service.rb +91 -0
- data/lib/sem4r/campaign_criterion/campaign_criterion_service.rb +30 -0
- data/lib/sem4r/campaign_target/campaign_target_service.rb +30 -0
- data/lib/sem4r/cli/cli_command.rb +101 -0
- data/lib/sem4r/cli/cli_commands.rb +60 -0
- data/lib/sem4r/cli/cli_common_args.rb +293 -0
- data/lib/sem4r/cli/cli_download_report.rb +81 -0
- data/lib/sem4r/cli/cli_helpers.rb +57 -0
- data/lib/sem4r/cli/cli_ideas.rb +100 -0
- data/lib/sem4r/cli/cli_list_ads.rb +74 -0
- data/lib/sem4r/cli/cli_list_keywords.rb +76 -0
- data/lib/sem4r/cli/cli_request_report.rb +104 -0
- data/lib/sem4r/cli/cli_sem.rb +64 -0
- data/lib/sem4r/common/operation.rb +78 -0
- data/lib/sem4r/credentials.rb +86 -0
- data/lib/sem4r/extensions.rb +62 -0
- data/lib/sem4r/geo_location/geo_location_service.rb +59 -0
- data/lib/sem4r/info/info_service.rb +115 -0
- data/lib/sem4r/report_definition/report_definition.rb +104 -0
- data/lib/sem4r/report_definition/report_definition_operation.rb +34 -0
- data/lib/sem4r/report_definition/report_definition_selector.rb +31 -0
- data/lib/sem4r/report_definition/report_definition_service.rb +55 -0
- data/lib/sem4r/sem4r_error.rb +28 -0
- data/lib/sem4r/services/service.rb +74 -0
- data/lib/sem4r/services/soap_call.rb +100 -0
- data/lib/sem4r/services/soap_connector.rb +284 -0
- data/lib/sem4r/services/soap_error.rb +38 -0
- data/lib/sem4r/services/soap_message_v13.rb +129 -0
- data/lib/sem4r/services/soap_message_v2009.rb +170 -0
- data/lib/sem4r/soap_attributes.rb +141 -0
- data/lib/sem4r/targeting_idea/targeting_idea.rb +158 -0
- data/lib/sem4r/targeting_idea/targeting_idea_selector.rb +200 -0
- data/lib/sem4r/targeting_idea/targeting_idea_service.rb +51 -0
- data/lib/sem4r/v13_account/account_service.rb +54 -0
- data/lib/sem4r/v13_account/billing_address.rb +67 -0
- data/lib/sem4r/v13_report/report.rb +185 -0
- data/lib/sem4r/v13_report/report_job.rb +51 -0
- data/lib/sem4r/v13_report/report_service.rb +89 -0
- data/lib/sem4r/v13_traffic_estimator/traffic_estimator_service.rb +30 -0
- data/lib/sem4r.rb +142 -0
- data/lib/sem4r_cli.rb +40 -0
- data/sem4r.gemspec +247 -0
- data/spec/aggregates_spec_helper.rb +59 -0
- data/spec/fixtures/sem4r.example.yml +26 -0
- data/spec/fixtures/services/ad_group/get-first-req.xml +28 -0
- data/spec/fixtures/services/ad_group/get-first-res.xml +91 -0
- data/spec/fixtures/services/ad_group/get-manual-cpm-bids-req.xml +106 -0
- data/spec/fixtures/services/ad_group/get-manual-cpm-bids-res.xml +75 -0
- data/spec/fixtures/services/ad_group/mutate_add-req.xml +52 -0
- data/spec/fixtures/services/ad_group/mutate_add-res.xml +33 -0
- data/spec/fixtures/services/ad_group_ad/get_mobile_ad-req.xml +28 -0
- data/spec/fixtures/services/ad_group_ad/get_mobile_ad-res.xml +194 -0
- data/spec/fixtures/services/ad_group_ad/get_text_ad-req.xml +29 -0
- data/spec/fixtures/services/ad_group_ad/get_text_ad-res.xml +55 -0
- data/spec/fixtures/services/ad_group_ad/mutate_add_mobile_ad-req.xml +50 -0
- data/spec/fixtures/services/ad_group_ad/mutate_add_mobile_ad-res.xml +42 -0
- data/spec/fixtures/services/ad_group_ad/mutate_add_text_ad-req.xml +37 -0
- data/spec/fixtures/services/ad_group_ad/mutate_add_text_ad-res.xml +32 -0
- data/spec/fixtures/services/ad_group_ad/mutate_add_two_criterions-req.xml +83 -0
- data/spec/fixtures/services/ad_group_ad/mutate_add_two_criterions-res.xml +95 -0
- data/spec/fixtures/services/ad_group_criterion/get-req.xml +28 -0
- data/spec/fixtures/services/ad_group_criterion/get-res.xml +242 -0
- data/spec/fixtures/services/ad_group_criterion/mutate_add_criterion_keyword-req.xml +48 -0
- data/spec/fixtures/services/ad_group_criterion/mutate_add_criterion_keyword-res.xml +47 -0
- data/spec/fixtures/services/ad_group_criterion/mutate_add_criterion_placement-req.xml +35 -0
- data/spec/fixtures/services/ad_group_criterion/mutate_add_criterion_placement-res.xml +32 -0
- data/spec/fixtures/services/ad_group_criterion/mutate_add_negative_keyword-req.xml +37 -0
- data/spec/fixtures/services/ad_group_criterion/mutate_add_negative_keyword-res.xml +51 -0
- data/spec/fixtures/services/ad_param/mutate_set-req.xml +43 -0
- data/spec/fixtures/services/ad_param/mutate_set-res.xml +29 -0
- data/spec/fixtures/services/bulk_mutate_job/get-req.xml +36 -0
- data/spec/fixtures/services/bulk_mutate_job/get-res.xml +54 -0
- data/spec/fixtures/services/bulk_mutate_job/mutate-req.xml +69 -0
- data/spec/fixtures/services/bulk_mutate_job/mutate-res.xml +48 -0
- data/spec/fixtures/services/campaign/get-req.xml +37 -0
- data/spec/fixtures/services/campaign/get-res.xml +1986 -0
- data/spec/fixtures/services/campaign/mutate_add-req.xml +37 -0
- data/spec/fixtures/services/campaign/mutate_add-res.xml +42 -0
- data/spec/fixtures/services/error.xml +28 -0
- data/spec/fixtures/services/info/get_unit_count-req.xml +30 -0
- data/spec/fixtures/services/info/get_unit_count-res.xml +29 -0
- data/spec/fixtures/services/report_definition/mutate_add-req.xml +24 -0
- data/spec/fixtures/services/report_definition/mutate_add-req_orig.xml +45 -0
- data/spec/fixtures/services/targeting_idea/get-req-all-options.xml +57 -0
- data/spec/fixtures/services/targeting_idea/get-req.xml +60 -0
- data/spec/fixtures/services/targeting_idea/get-res.xml +3601 -0
- data/spec/fixtures/services/v13_account/get_account_info-req.xml +23 -0
- data/spec/fixtures/services/v13_account/get_account_info-res.xml +54 -0
- data/spec/fixtures/services/v13_account/get_client_accounts-req.xml +22 -0
- data/spec/fixtures/services/v13_account/get_client_accounts-res.xml +37 -0
- data/spec/fixtures/services/v13_report/get_all_jobs-req.xml +21 -0
- data/spec/fixtures/services/v13_report/get_all_jobs-res.xml +109 -0
- data/spec/fixtures/services/v13_report/schedule_report_job-req.xml +56 -0
- data/spec/fixtures/services/v13_report/schedule_report_job-res.xml +24 -0
- data/spec/sem4r/account_spec.rb +86 -0
- data/spec/sem4r/ad_group/ad_group_bids_spec.rb +67 -0
- data/spec/sem4r/ad_group/ad_group_service_spec.rb +66 -0
- data/spec/sem4r/ad_group/ad_group_spec.rb +212 -0
- data/spec/sem4r/ad_group_ad/ad_group_ad_operation_spec.rb +88 -0
- data/spec/sem4r/ad_group_ad/ad_group_ad_service_spec.rb +55 -0
- data/spec/sem4r/ad_group_ad/ad_group_ad_spec.rb +173 -0
- data/spec/sem4r/ad_group_criterion/ad_group_criterion_bids_spec.rb +60 -0
- data/spec/sem4r/ad_group_criterion/ad_group_criterion_service_spec.rb +55 -0
- data/spec/sem4r/ad_group_criterion/ad_group_criterion_spec.rb +103 -0
- data/spec/sem4r/ad_group_criterion/criterion_spec.rb +85 -0
- data/spec/sem4r/ad_param/ad_param_service_spec.rb +55 -0
- data/spec/sem4r/ad_param/ad_param_spec.rb +59 -0
- data/spec/sem4r/adwords_spec.rb +110 -0
- data/spec/sem4r/bulk_mutate_job/bulk_mutate_job_service_spec.rb +63 -0
- data/spec/sem4r/bulk_mutate_job/bulk_mutate_job_spec.rb +69 -0
- data/spec/sem4r/bulk_mutate_job/job_operation_spec.rb +48 -0
- data/spec/sem4r/campaign/campaign_service_spec.rb +66 -0
- data/spec/sem4r/campaign/campaign_spec.rb +105 -0
- data/spec/sem4r/cli/cli_spec.rb +71 -0
- data/spec/sem4r/credentials_spec.rb +65 -0
- data/spec/sem4r/report_definition/report_definition_service_spec.rb +44 -0
- data/spec/sem4r/report_definition/report_definition_spec.rb +105 -0
- data/spec/sem4r/rexml_parsing_spec.rb +103 -0
- data/spec/sem4r/services/service_spec.rb +36 -0
- data/spec/sem4r/services/soap_call_spec.rb +115 -0
- data/spec/sem4r/services/soap_message_v13_spec.rb +54 -0
- data/spec/sem4r/soap_attributes_spec.rb +116 -0
- data/spec/sem4r/targeting_idea/targeting_idea_selector_spec.rb +120 -0
- data/spec/sem4r/targeting_idea/targeting_idea_service_spec.rb +44 -0
- data/spec/sem4r/targeting_idea/targeting_idea_spec.rb +53 -0
- data/spec/sem4r/v13_account/account_service_spec.rb +60 -0
- data/spec/sem4r/v13_report/report_service_spec.rb +104 -0
- data/spec/sem4r/v13_report/report_spec.rb +79 -0
- data/spec/sem4r_spec_helper.rb +353 -0
- data/spec/spec_helper.rb +12 -0
- metadata +375 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
# -------------------------------------------------------------------
|
2
|
+
# Copyright (c) 2009-2010 Sem4r sem4ruby@gmail.com
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
# -------------------------------------------------------------------
|
23
|
+
|
24
|
+
module Sem4r
|
25
|
+
class TrafficEstimatorService
|
26
|
+
def initialize
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/sem4r.rb
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
# -------------------------------------------------------------------
|
2
|
+
# Copyright (c) 2009-2010 Sem4r sem4ruby@gmail.com
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
# -------------------------------------------------------------------
|
23
|
+
|
24
|
+
require 'yaml'
|
25
|
+
require 'pathname'
|
26
|
+
require 'rubygems'
|
27
|
+
require 'builder'
|
28
|
+
require 'rexml/document'
|
29
|
+
require 'uri'
|
30
|
+
require 'pp'
|
31
|
+
require 'logger'
|
32
|
+
require 'fileutils'
|
33
|
+
|
34
|
+
module Sem4r #:nodoc:
|
35
|
+
def self.version
|
36
|
+
cwd = Pathname(__FILE__).dirname.expand_path.to_s
|
37
|
+
yaml = YAML.load_file(cwd + '/../VERSION.yml')
|
38
|
+
major = (yaml['major'] || yaml[:major]).to_i
|
39
|
+
minor = (yaml['minor'] || yaml[:minor]).to_i
|
40
|
+
patch = (yaml['patch'] || yaml[:patch]).to_i
|
41
|
+
"#{major}.#{minor}.#{patch}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
cwd = Pathname(__FILE__).dirname
|
46
|
+
$:.unshift(cwd.to_s) unless $:.include?(cwd.to_s) || $:.include?(cwd.expand_path.to_s)
|
47
|
+
|
48
|
+
require 'sem4r/extensions.rb'
|
49
|
+
|
50
|
+
require 'sem4r/adwords'
|
51
|
+
require 'sem4r/credentials'
|
52
|
+
require 'sem4r/sem4r_error'
|
53
|
+
require 'sem4r/soap_attributes'
|
54
|
+
|
55
|
+
require 'sem4r/base'
|
56
|
+
require 'sem4r/account'
|
57
|
+
|
58
|
+
|
59
|
+
#
|
60
|
+
# soap connection layer
|
61
|
+
#
|
62
|
+
require 'sem4r/services/soap_error'
|
63
|
+
require 'sem4r/services/soap_connector'
|
64
|
+
require 'sem4r/services/soap_message_v13'
|
65
|
+
require 'sem4r/services/soap_message_v2009'
|
66
|
+
require 'sem4r/services/soap_call'
|
67
|
+
require 'sem4r/services/service'
|
68
|
+
|
69
|
+
#
|
70
|
+
# common
|
71
|
+
#
|
72
|
+
require 'sem4r/common/operation'
|
73
|
+
|
74
|
+
#
|
75
|
+
# adgroup
|
76
|
+
#
|
77
|
+
require 'sem4r/ad_group/ad_group_bids'
|
78
|
+
require 'sem4r/ad_group/mobile_ad_image'
|
79
|
+
require 'sem4r/ad_group/ad_group'
|
80
|
+
|
81
|
+
#
|
82
|
+
# adgroup_ad
|
83
|
+
#
|
84
|
+
require 'sem4r/ad_group_ad/ad_group_ad_operations'
|
85
|
+
require 'sem4r/ad_group_ad/ad_group_ad'
|
86
|
+
require 'sem4r/ad_group_ad/ad_group_text_ad'
|
87
|
+
require 'sem4r/ad_group_ad/ad_group_mobile_ad'
|
88
|
+
|
89
|
+
#
|
90
|
+
# adgroup_criterion
|
91
|
+
#
|
92
|
+
require 'sem4r/ad_group_criterion/ad_group_criterion_bids'
|
93
|
+
require 'sem4r/ad_group_criterion/ad_group_criterion_operations'
|
94
|
+
require 'sem4r/ad_group_criterion/criterion'
|
95
|
+
require 'sem4r/ad_group_criterion/criterion_keyword'
|
96
|
+
require 'sem4r/ad_group_criterion/criterion_placement'
|
97
|
+
require 'sem4r/ad_group_criterion/ad_group_criterion'
|
98
|
+
|
99
|
+
#
|
100
|
+
# ad_param
|
101
|
+
#
|
102
|
+
require 'sem4r/ad_param/ad_param'
|
103
|
+
require 'sem4r/ad_param/ad_param_operation'
|
104
|
+
|
105
|
+
#
|
106
|
+
# bulk_mutate_job
|
107
|
+
#
|
108
|
+
require 'sem4r/bulk_mutate_job/job_operations'
|
109
|
+
require 'sem4r/bulk_mutate_job/bulk_mutate_job_selector'
|
110
|
+
require 'sem4r/bulk_mutate_job/bulk_mutate_job'
|
111
|
+
|
112
|
+
#
|
113
|
+
# campaign
|
114
|
+
#
|
115
|
+
require 'sem4r/campaign/campaign'
|
116
|
+
|
117
|
+
|
118
|
+
#
|
119
|
+
# targeting_idea
|
120
|
+
#
|
121
|
+
require 'sem4r/targeting_idea/targeting_idea'
|
122
|
+
require 'sem4r/targeting_idea/targeting_idea_selector'
|
123
|
+
|
124
|
+
#
|
125
|
+
# v13_account
|
126
|
+
#
|
127
|
+
require 'sem4r/v13_account/billing_address'
|
128
|
+
|
129
|
+
#
|
130
|
+
# v13_report
|
131
|
+
#
|
132
|
+
require 'sem4r/v13_report/report'
|
133
|
+
require 'sem4r/v13_report/report_job'
|
134
|
+
|
135
|
+
|
136
|
+
#
|
137
|
+
# report_definition
|
138
|
+
#
|
139
|
+
require 'sem4r/report_definition/report_definition'
|
140
|
+
require 'sem4r/report_definition/report_definition_selector'
|
141
|
+
require 'sem4r/report_definition/report_definition_operation'
|
142
|
+
|
data/lib/sem4r_cli.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# -------------------------------------------------------------------
|
2
|
+
# Copyright (c) 2009-2010 Sem4r sem4ruby@gmail.com
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
# -------------------------------------------------------------------
|
23
|
+
|
24
|
+
require 'optparse'
|
25
|
+
require 'ostruct'
|
26
|
+
# require "highline/import" # to ask password on command line
|
27
|
+
|
28
|
+
require 'sem4r'
|
29
|
+
require 'sem4r/cli/cli_sem'
|
30
|
+
require 'sem4r/cli/cli_common_args'
|
31
|
+
require 'sem4r/cli/cli_command'
|
32
|
+
require 'sem4r/cli/cli_helpers'
|
33
|
+
|
34
|
+
# commands
|
35
|
+
require 'sem4r/cli/cli_commands'
|
36
|
+
require 'sem4r/cli/cli_download_report'
|
37
|
+
require 'sem4r/cli/cli_ideas'
|
38
|
+
require 'sem4r/cli/cli_list_ads'
|
39
|
+
require 'sem4r/cli/cli_list_keywords'
|
40
|
+
require 'sem4r/cli/cli_request_report'
|
data/sem4r.gemspec
ADDED
@@ -0,0 +1,247 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{sem4r}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Sem4r"]
|
12
|
+
s.date = %q{2010-06-19}
|
13
|
+
s.default_executable = %q{sem}
|
14
|
+
s.description = %q{
|
15
|
+
Sem4r is a library to access google adwords api.
|
16
|
+
It will works with ruby 1.9 and ruby 1.8 without soap4r.
|
17
|
+
It uses a high level model instead of a low level api.
|
18
|
+
You think about clients, campaigns, keywords and not about operations, operands, selectors, service calls.
|
19
|
+
|
20
|
+
This is a ALPHA version don't use in production.
|
21
|
+
If you are interested in this project let me now: install it and update periodically, so the gemcutter
|
22
|
+
download counter go up. Or subscribe to my feed at sem4r.com. Or watch the project on github.
|
23
|
+
Or simply drop me a line in email. However I will know there is someone out of here.
|
24
|
+
}
|
25
|
+
s.email = %q{sem4ruby@gmail.com}
|
26
|
+
s.executables = ["sem"]
|
27
|
+
s.extra_rdoc_files = [
|
28
|
+
"LICENSE",
|
29
|
+
"README.rdoc"
|
30
|
+
]
|
31
|
+
s.files = [
|
32
|
+
"LICENSE",
|
33
|
+
"README.rdoc",
|
34
|
+
"Rakefile",
|
35
|
+
"VERSION.yml",
|
36
|
+
"config/sem4r.example.yml",
|
37
|
+
"examples_blog/2009-11-29-hello-world.rb",
|
38
|
+
"examples_blog/2009-12-12-create-campaign.rb",
|
39
|
+
"examples_blog/2010-02-06-constants-scope.rb",
|
40
|
+
"examples_blog/2010-02-07-ad-parameters.rb",
|
41
|
+
"examples_sem4r/01_get_account.rb",
|
42
|
+
"examples_sem4r/02_get_info.rb",
|
43
|
+
"examples_sem4r/03_list_ad.rb",
|
44
|
+
"examples_sem4r/04_list_keywords.rb",
|
45
|
+
"examples_sem4r/05_request_report.rb",
|
46
|
+
"examples_sem4r/06_create_campaigns.rb",
|
47
|
+
"examples_sem4r/07_create_campaigns_block.rb",
|
48
|
+
"examples_sem4r/07_create_campaigns_simple.rb",
|
49
|
+
"examples_sem4r/08_ad_params.rb",
|
50
|
+
"examples_sem4r/09_targeting_idea.rb",
|
51
|
+
"examples_sem4r/10_get_location.rb",
|
52
|
+
"examples_sem4r/11_submit_bulk_job.rb",
|
53
|
+
"examples_sem4r/12_list_bulk_job.rb",
|
54
|
+
"examples_sem4r/30_prune_empty_adgroup.rb",
|
55
|
+
"examples_sem4r/31_empty_accounts.rb",
|
56
|
+
"examples_sem4r/example_helper.rb",
|
57
|
+
"lib/sem4r.rb",
|
58
|
+
"lib/sem4r/account.rb",
|
59
|
+
"lib/sem4r/ad_extension_override/ad_extension_override_service.rb",
|
60
|
+
"lib/sem4r/ad_group/ad_group.rb",
|
61
|
+
"lib/sem4r/ad_group/ad_group_bids.rb",
|
62
|
+
"lib/sem4r/ad_group/ad_group_service.rb",
|
63
|
+
"lib/sem4r/ad_group/mobile_ad_image.rb",
|
64
|
+
"lib/sem4r/ad_group_ad/ad_group_ad.rb",
|
65
|
+
"lib/sem4r/ad_group_ad/ad_group_ad_operations.rb",
|
66
|
+
"lib/sem4r/ad_group_ad/ad_group_ad_service.rb",
|
67
|
+
"lib/sem4r/ad_group_ad/ad_group_mobile_ad.rb",
|
68
|
+
"lib/sem4r/ad_group_ad/ad_group_text_ad.rb",
|
69
|
+
"lib/sem4r/ad_group_criterion/ad_group_criterion.rb",
|
70
|
+
"lib/sem4r/ad_group_criterion/ad_group_criterion_bids.rb",
|
71
|
+
"lib/sem4r/ad_group_criterion/ad_group_criterion_operations.rb",
|
72
|
+
"lib/sem4r/ad_group_criterion/ad_group_criterion_service.rb",
|
73
|
+
"lib/sem4r/ad_group_criterion/criterion.rb",
|
74
|
+
"lib/sem4r/ad_group_criterion/criterion_keyword.rb",
|
75
|
+
"lib/sem4r/ad_group_criterion/criterion_placement.rb",
|
76
|
+
"lib/sem4r/ad_param/ad_param.rb",
|
77
|
+
"lib/sem4r/ad_param/ad_param_operation.rb",
|
78
|
+
"lib/sem4r/ad_param/ad_param_service.rb",
|
79
|
+
"lib/sem4r/adwords.rb",
|
80
|
+
"lib/sem4r/api_counters.rb",
|
81
|
+
"lib/sem4r/base.rb",
|
82
|
+
"lib/sem4r/bulk_mutate_job/bulk_mutate_job.rb",
|
83
|
+
"lib/sem4r/bulk_mutate_job/bulk_mutate_job_selector.rb",
|
84
|
+
"lib/sem4r/bulk_mutate_job/bulk_mutate_job_service.rb",
|
85
|
+
"lib/sem4r/bulk_mutate_job/job_operations.rb",
|
86
|
+
"lib/sem4r/campaign/campaign.rb",
|
87
|
+
"lib/sem4r/campaign/campaign_service.rb",
|
88
|
+
"lib/sem4r/campaign_criterion/campaign_criterion_service.rb",
|
89
|
+
"lib/sem4r/campaign_target/campaign_target_service.rb",
|
90
|
+
"lib/sem4r/cli/cli_command.rb",
|
91
|
+
"lib/sem4r/cli/cli_commands.rb",
|
92
|
+
"lib/sem4r/cli/cli_common_args.rb",
|
93
|
+
"lib/sem4r/cli/cli_download_report.rb",
|
94
|
+
"lib/sem4r/cli/cli_helpers.rb",
|
95
|
+
"lib/sem4r/cli/cli_ideas.rb",
|
96
|
+
"lib/sem4r/cli/cli_list_ads.rb",
|
97
|
+
"lib/sem4r/cli/cli_list_keywords.rb",
|
98
|
+
"lib/sem4r/cli/cli_request_report.rb",
|
99
|
+
"lib/sem4r/cli/cli_sem.rb",
|
100
|
+
"lib/sem4r/common/operation.rb",
|
101
|
+
"lib/sem4r/credentials.rb",
|
102
|
+
"lib/sem4r/extensions.rb",
|
103
|
+
"lib/sem4r/geo_location/geo_location_service.rb",
|
104
|
+
"lib/sem4r/info/info_service.rb",
|
105
|
+
"lib/sem4r/sem4r_error.rb",
|
106
|
+
"lib/sem4r/services/service.rb",
|
107
|
+
"lib/sem4r/services/soap_call.rb",
|
108
|
+
"lib/sem4r/services/soap_connector.rb",
|
109
|
+
"lib/sem4r/services/soap_error.rb",
|
110
|
+
"lib/sem4r/services/soap_message_v13.rb",
|
111
|
+
"lib/sem4r/services/soap_message_v2009.rb",
|
112
|
+
"lib/sem4r/soap_attributes.rb",
|
113
|
+
"lib/sem4r/targeting_idea/targeting_idea.rb",
|
114
|
+
"lib/sem4r/targeting_idea/targeting_idea_selector.rb",
|
115
|
+
"lib/sem4r/targeting_idea/targeting_idea_service.rb",
|
116
|
+
"lib/sem4r/v13_account/account_service.rb",
|
117
|
+
"lib/sem4r/v13_account/billing_address.rb",
|
118
|
+
"lib/sem4r/v13_report/report.rb",
|
119
|
+
"lib/sem4r/v13_report/report_job.rb",
|
120
|
+
"lib/sem4r/v13_report/report_service.rb",
|
121
|
+
"lib/sem4r/v13_traffic_estimator/traffic_estimator_service.rb",
|
122
|
+
"lib/sem4r_cli.rb",
|
123
|
+
"sem4r.gemspec"
|
124
|
+
]
|
125
|
+
s.homepage = %q{http://www.sem4r.com}
|
126
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
127
|
+
s.require_paths = ["lib"]
|
128
|
+
s.rubygems_version = %q{1.3.7}
|
129
|
+
s.summary = %q{Library to access google adwords api. Works with ruby 1.9 and ruby 1.8}
|
130
|
+
s.test_files = [
|
131
|
+
"spec/sem4r/services/soap_message_v13_spec.rb",
|
132
|
+
"spec/sem4r/services/soap_call_spec.rb",
|
133
|
+
"spec/sem4r/services/service_spec.rb",
|
134
|
+
"spec/sem4r/v13_report/report_spec.rb",
|
135
|
+
"spec/sem4r/v13_report/report_service_spec.rb",
|
136
|
+
"spec/sem4r/credentials_spec.rb",
|
137
|
+
"spec/sem4r/adwords_spec.rb",
|
138
|
+
"spec/sem4r/soap_attributes_spec.rb",
|
139
|
+
"spec/sem4r/rexml_parsing_spec.rb",
|
140
|
+
"spec/sem4r/cli/cli_spec.rb",
|
141
|
+
"spec/sem4r/ad_group_criterion/ad_group_criterion_bids_spec.rb",
|
142
|
+
"spec/sem4r/ad_group_criterion/ad_group_criterion_spec.rb",
|
143
|
+
"spec/sem4r/ad_group_criterion/criterion_spec.rb",
|
144
|
+
"spec/sem4r/ad_group_criterion/ad_group_criterion_service_spec.rb",
|
145
|
+
"spec/sem4r/ad_group/ad_group_bids_spec.rb",
|
146
|
+
"spec/sem4r/ad_group/ad_group_spec.rb",
|
147
|
+
"spec/sem4r/ad_group/ad_group_service_spec.rb",
|
148
|
+
"spec/sem4r/ad_group_ad/ad_group_ad_spec.rb",
|
149
|
+
"spec/sem4r/ad_group_ad/ad_group_ad_operation_spec.rb",
|
150
|
+
"spec/sem4r/ad_group_ad/ad_group_ad_service_spec.rb",
|
151
|
+
"spec/sem4r/account_spec.rb",
|
152
|
+
"spec/sem4r/ad_param/ad_param_spec.rb",
|
153
|
+
"spec/sem4r/ad_param/ad_param_service_spec.rb",
|
154
|
+
"spec/sem4r/bulk_mutate_job/bulk_mutate_job_spec.rb",
|
155
|
+
"spec/sem4r/bulk_mutate_job/job_operation_spec.rb",
|
156
|
+
"spec/sem4r/bulk_mutate_job/bulk_mutate_job_service_spec.rb",
|
157
|
+
"spec/sem4r/campaign/campaign_spec.rb",
|
158
|
+
"spec/sem4r/campaign/campaign_service_spec.rb",
|
159
|
+
"spec/sem4r/targeting_idea/targeting_idea_selector_spec.rb",
|
160
|
+
"spec/sem4r/targeting_idea/targeting_idea_spec.rb",
|
161
|
+
"spec/sem4r/targeting_idea/targeting_idea_service_spec.rb",
|
162
|
+
"spec/sem4r/v13_account/account_service_spec.rb",
|
163
|
+
"spec/spec_helper.rb",
|
164
|
+
"spec/sem4r_spec_helper.rb",
|
165
|
+
"spec/aggregates_spec_helper.rb",
|
166
|
+
"spec/fixtures/sem4r.example.yml",
|
167
|
+
"spec/fixtures/services",
|
168
|
+
"spec/fixtures/services/ad_group",
|
169
|
+
"spec/fixtures/services/ad_group/mutate_add-req.xml",
|
170
|
+
"spec/fixtures/services/ad_group/get-first-req.xml",
|
171
|
+
"spec/fixtures/services/ad_group/mutate_add-res.xml",
|
172
|
+
"spec/fixtures/services/ad_group/get-first-res.xml",
|
173
|
+
"spec/fixtures/services/ad_group/get-manual-cpm-bids-res.xml",
|
174
|
+
"spec/fixtures/services/ad_group/get-manual-cpm-bids-req.xml",
|
175
|
+
"spec/fixtures/services/v13_report",
|
176
|
+
"spec/fixtures/services/v13_report/get_all_jobs-req.xml",
|
177
|
+
"spec/fixtures/services/v13_report/get_all_jobs-res.xml",
|
178
|
+
"spec/fixtures/services/v13_report/schedule_report_job-req.xml",
|
179
|
+
"spec/fixtures/services/v13_report/schedule_report_job-res.xml",
|
180
|
+
"spec/fixtures/services/bulk_mutate_job",
|
181
|
+
"spec/fixtures/services/bulk_mutate_job/get-res.xml",
|
182
|
+
"spec/fixtures/services/bulk_mutate_job/get-req.xml",
|
183
|
+
"spec/fixtures/services/bulk_mutate_job/mutate-res.xml",
|
184
|
+
"spec/fixtures/services/bulk_mutate_job/mutate-req.xml",
|
185
|
+
"spec/fixtures/services/ad_param",
|
186
|
+
"spec/fixtures/services/ad_param/mutate_set-res.xml",
|
187
|
+
"spec/fixtures/services/ad_param/mutate_set-req.xml",
|
188
|
+
"spec/fixtures/services/campaign",
|
189
|
+
"spec/fixtures/services/campaign/get-res.xml",
|
190
|
+
"spec/fixtures/services/campaign/mutate_add-req.xml",
|
191
|
+
"spec/fixtures/services/campaign/mutate_add-res.xml",
|
192
|
+
"spec/fixtures/services/campaign/get-req.xml",
|
193
|
+
"spec/fixtures/services/info",
|
194
|
+
"spec/fixtures/services/info/get_unit_count-req.xml",
|
195
|
+
"spec/fixtures/services/info/get_unit_count-res.xml",
|
196
|
+
"spec/fixtures/services/error.xml",
|
197
|
+
"spec/fixtures/services/ad_group_ad",
|
198
|
+
"spec/fixtures/services/ad_group_ad/get_text_ad-res.xml",
|
199
|
+
"spec/fixtures/services/ad_group_ad/mutate_add_text_ad-res.xml",
|
200
|
+
"spec/fixtures/services/ad_group_ad/get_mobile_ad-req.xml",
|
201
|
+
"spec/fixtures/services/ad_group_ad/mutate_add_text_ad-req.xml",
|
202
|
+
"spec/fixtures/services/ad_group_ad/mutate_add_mobile_ad-res.xml",
|
203
|
+
"spec/fixtures/services/ad_group_ad/mutate_add_mobile_ad-req.xml",
|
204
|
+
"spec/fixtures/services/ad_group_ad/get_text_ad-req.xml",
|
205
|
+
"spec/fixtures/services/ad_group_ad/get_mobile_ad-res.xml",
|
206
|
+
"spec/fixtures/services/ad_group_ad/mutate_add_two_criterions-req.xml",
|
207
|
+
"spec/fixtures/services/ad_group_ad/mutate_add_two_criterions-res.xml",
|
208
|
+
"spec/fixtures/services/v13_account",
|
209
|
+
"spec/fixtures/services/v13_account/get_account_info-req.xml",
|
210
|
+
"spec/fixtures/services/v13_account/get_account_info-res.xml",
|
211
|
+
"spec/fixtures/services/v13_account/get_client_accounts-res.xml",
|
212
|
+
"spec/fixtures/services/v13_account/get_client_accounts-req.xml",
|
213
|
+
"spec/fixtures/services/ad_group_criterion",
|
214
|
+
"spec/fixtures/services/ad_group_criterion/mutate_add_criterion_placement-res.xml",
|
215
|
+
"spec/fixtures/services/ad_group_criterion/mutate_add_criterion_placement-req.xml",
|
216
|
+
"spec/fixtures/services/ad_group_criterion/get-res.xml",
|
217
|
+
"spec/fixtures/services/ad_group_criterion/mutate_add_criterion_keyword-res.xml",
|
218
|
+
"spec/fixtures/services/ad_group_criterion/get-req.xml",
|
219
|
+
"spec/fixtures/services/ad_group_criterion/mutate_add_criterion_keyword-req.xml",
|
220
|
+
"spec/fixtures/services/ad_group_criterion/mutate_add_negative_keyword-res.xml",
|
221
|
+
"spec/fixtures/services/ad_group_criterion/mutate_add_negative_keyword-req.xml",
|
222
|
+
"spec/fixtures/services/targeting_idea",
|
223
|
+
"spec/fixtures/services/targeting_idea/get-req.xml",
|
224
|
+
"spec/fixtures/services/targeting_idea/get-res.xml",
|
225
|
+
"spec/fixtures/services/targeting_idea/get-req-all-options.xml"
|
226
|
+
]
|
227
|
+
|
228
|
+
if s.respond_to? :specification_version then
|
229
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
230
|
+
s.specification_version = 3
|
231
|
+
|
232
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
233
|
+
s.add_runtime_dependency(%q<builder>, [">= 0"])
|
234
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
235
|
+
s.add_development_dependency(%q<differ>, [">= 0"])
|
236
|
+
else
|
237
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
238
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
239
|
+
s.add_dependency(%q<differ>, [">= 0"])
|
240
|
+
end
|
241
|
+
else
|
242
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
243
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
244
|
+
s.add_dependency(%q<differ>, [">= 0"])
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# -------------------------------------------------------------------------
|
2
|
+
# Copyright (c) 2009-2010 Sem4r sem4ruby@gmail.com
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#
|
23
|
+
# -------------------------------------------------------------------------
|
24
|
+
|
25
|
+
module AggregatesSpecHelper
|
26
|
+
def create_bulk_mutate_job(campaign, adgroup)
|
27
|
+
# TextAd
|
28
|
+
text_ad1 = AdGroupTextAd.new(adgroup)
|
29
|
+
text_ad1.headline = "Cruise to Mars Sector 1"
|
30
|
+
text_ad1.description1 = "Visit the Red Planet in style."
|
31
|
+
text_ad1.description2 = "Low-gravity fun for everyone!"
|
32
|
+
text_ad1.url = "http://www.example.com"
|
33
|
+
text_ad1.display_url = "www.example.com"
|
34
|
+
|
35
|
+
# TextAd
|
36
|
+
text_ad2 = AdGroupTextAd.new(adgroup)
|
37
|
+
text_ad2.headline = "Cruise to Mars Sector 2"
|
38
|
+
text_ad2.description1 = "Visit the Red Planet in style."
|
39
|
+
text_ad2.description2 = "Low-gravity fun for everyone!"
|
40
|
+
text_ad2.url = "http://www.example.com"
|
41
|
+
text_ad2.display_url = "www.example.com"
|
42
|
+
|
43
|
+
# adgroupad_operation
|
44
|
+
ad_operation1 = AdGroupAdOperation.new
|
45
|
+
ad_operation1.add text_ad1
|
46
|
+
|
47
|
+
# adgroupad_operation
|
48
|
+
ad_operation2 = AdGroupAdOperation.new
|
49
|
+
ad_operation2.add text_ad2
|
50
|
+
|
51
|
+
bulk_mutate_job = BulkMutateJob.new
|
52
|
+
bulk_mutate_job.campaign_id = campaign.id
|
53
|
+
bulk_mutate_job.add_operation ad_operation1
|
54
|
+
bulk_mutate_job.add_operation ad_operation2
|
55
|
+
|
56
|
+
bulk_mutate_job
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# Example config file
|
3
|
+
#
|
4
|
+
google_adwords:
|
5
|
+
|
6
|
+
sandbox:
|
7
|
+
email: example@gmail.com
|
8
|
+
password: password
|
9
|
+
developer_token: example@gmail.com++EUR
|
10
|
+
|
11
|
+
sandbox1:
|
12
|
+
environment: sandbox
|
13
|
+
email: example@gmail.com
|
14
|
+
password: password
|
15
|
+
developer_token: example@gmail.com++EUR
|
16
|
+
|
17
|
+
production:
|
18
|
+
email: production@mysite.com
|
19
|
+
password: password
|
20
|
+
developer_token: productiondevelopertoken
|
21
|
+
|
22
|
+
production1:
|
23
|
+
environment: production
|
24
|
+
email: production@anothersite.com
|
25
|
+
password: password
|
26
|
+
developer_token: productiondevelopertoken
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<env:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns='https://adwords.google.com/api/adwords/cm/v200909' xmlns:s='https://adwords.google.com/api/adwords/cm/v200909'>
|
3
|
+
<env:Header>
|
4
|
+
<s:RequestHeader env:mustUnderstand='0'>
|
5
|
+
<authToken>
|
6
|
+
***censured***
|
7
|
+
</authToken>
|
8
|
+
<userAgent>
|
9
|
+
Sem4r Adwords Ruby Client Library (http://github.com/sem4r/sem4r)
|
10
|
+
</userAgent>
|
11
|
+
<developerToken>
|
12
|
+
***censured***
|
13
|
+
</developerToken>
|
14
|
+
<clientEmail>
|
15
|
+
client_1+sem4ruby@gmail.com
|
16
|
+
</clientEmail>
|
17
|
+
</s:RequestHeader>
|
18
|
+
</env:Header>
|
19
|
+
<env:Body>
|
20
|
+
<get xmlns='https://adwords.google.com/api/adwords/cm/v200909'>
|
21
|
+
<selector>
|
22
|
+
<campaignId>
|
23
|
+
62746
|
24
|
+
</campaignId>
|
25
|
+
</selector>
|
26
|
+
</get>
|
27
|
+
</env:Body>
|
28
|
+
</env:Envelope>
|
@@ -0,0 +1,91 @@
|
|
1
|
+
<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
|
2
|
+
<soap:Header>
|
3
|
+
<ResponseHeader xmlns='https://adwords.google.com/api/adwords/cm/v200909'>
|
4
|
+
<requestId>3e97cd7f748479213cf0f78b356fd290</requestId>
|
5
|
+
<operations>2</operations>
|
6
|
+
<responseTime>170</responseTime>
|
7
|
+
<units>2</units>
|
8
|
+
</ResponseHeader>
|
9
|
+
</soap:Header>
|
10
|
+
|
11
|
+
<soap:Body>
|
12
|
+
<getResponse xmlns='https://adwords.google.com/api/adwords/cm/v200909'>
|
13
|
+
<rval>
|
14
|
+
|
15
|
+
<totalNumEntries>2</totalNumEntries>
|
16
|
+
<Page.Type>AdGroupPage</Page.Type>
|
17
|
+
<entries>
|
18
|
+
|
19
|
+
<id>3060217923</id>
|
20
|
+
<campaignId>62746</campaignId>
|
21
|
+
<campaignName>campaign 2010-02-13 09:38:39 +0100</campaignName>
|
22
|
+
<name>test adgroup</name>
|
23
|
+
<status>ENABLED</status>
|
24
|
+
|
25
|
+
<bids xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='ManualCPCAdGroupBids'>
|
26
|
+
<AdGroupBids.Type>ManualCPCAdGroupBids</AdGroupBids.Type>
|
27
|
+
<keywordMaxCpc>
|
28
|
+
<amount>
|
29
|
+
<ComparableValue.Type>Money</ComparableValue.Type>
|
30
|
+
<microAmount>20000000</microAmount>
|
31
|
+
</amount>
|
32
|
+
</keywordMaxCpc>
|
33
|
+
<siteMaxCpc>
|
34
|
+
<amount>
|
35
|
+
<ComparableValue.Type>Money</ComparableValue.Type>
|
36
|
+
<microAmount>30000000</microAmount>
|
37
|
+
</amount>
|
38
|
+
</siteMaxCpc>
|
39
|
+
</bids>
|
40
|
+
|
41
|
+
<stats>
|
42
|
+
<network>ALL</network>
|
43
|
+
<Stats.Type>Stats</Stats.Type>
|
44
|
+
</stats>
|
45
|
+
</entries>
|
46
|
+
|
47
|
+
<entries>
|
48
|
+
<id>
|
49
|
+
3060217924
|
50
|
+
</id>
|
51
|
+
<campaignId>
|
52
|
+
62746
|
53
|
+
</campaignId>
|
54
|
+
<campaignName>
|
55
|
+
campaign 2010-02-13 09:38:39 +0100
|
56
|
+
</campaignName>
|
57
|
+
<name>
|
58
|
+
adgroup dsl 2010-02-13 09:38:56 +0100
|
59
|
+
</name>
|
60
|
+
<status>
|
61
|
+
ENABLED
|
62
|
+
</status>
|
63
|
+
<bids xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='ManualCPCAdGroupBids'>
|
64
|
+
<AdGroupBids.Type>
|
65
|
+
ManualCPCAdGroupBids
|
66
|
+
</AdGroupBids.Type>
|
67
|
+
<keywordMaxCpc>
|
68
|
+
<amount>
|
69
|
+
<ComparableValue.Type>
|
70
|
+
Money
|
71
|
+
</ComparableValue.Type>
|
72
|
+
<microAmount>
|
73
|
+
10000000
|
74
|
+
</microAmount>
|
75
|
+
</amount>
|
76
|
+
</keywordMaxCpc>
|
77
|
+
</bids>
|
78
|
+
<stats>
|
79
|
+
<network>
|
80
|
+
ALL
|
81
|
+
</network>
|
82
|
+
<Stats.Type>
|
83
|
+
Stats
|
84
|
+
</Stats.Type>
|
85
|
+
</stats>
|
86
|
+
</entries>
|
87
|
+
</rval>
|
88
|
+
</getResponse>
|
89
|
+
</soap:Body>
|
90
|
+
</soap:Envelope>
|
91
|
+
<!-- end -->
|