Permalink
Browse files

Updating library to 17.0.0. Check ChangeLog.txt for changes.

  • Loading branch information...
1 parent 35a2f29 commit 19fe73e29cfff9f28772562b58096c6f363678b3 api.sgomes committed Oct 20, 2009
Showing 1,960 changed files with 237,669 additions and 6,027 deletions.
View
@@ -1,3 +1,24 @@
+17.0.0
+- Changed the parameter order in API.get_service (aka API.service) to be get_service(name, version).
+ The old ordering is still supported but deprecated. The version parameter is now optional and defaults to 13.
+- Added 'module' method to all the services.
+ This returns a reference to the module containing all the classes for the service, so the full class name isn't necessary.
+ For example, service_object.module::ClassName instead of AdWords::V13::SomeService::ClassName
+ Using this will also make it easier to upgrade between API versions, since it removes the need for hardcoded numbers.
+- Added 'use_mcc' property to the API object to make it easier to make requests at the MCC level.
+ Setting it to true will make all requests be sent with no clientEmail or clientCustomerId.
+ It's also possible to invoke the 'use_mcc' method with a block, and only that block will be executed at the MCC level.
+- Added 'validateOnly' property to the API object to make it easier to send requests with the 'validateOnly' header in v2009.
+ This header makes it possible to check a request for validity without executing it.
+- Changes in handling 'alternateUrl'; now it only errors out if there's no 'environment' defined.
+- CSV data updated for operation rates, now has an extra column at the beginning for API version.
+- Added several tests
+- Moved wrapper generation to its own file, generator.rb. This cleans up services.rb.
+- Added logging of the "operator" for v2009 mutate requests.
+- Fixed sample adwords.properties to use 'environment'.
+- Fixed problem with empty lines in adwords.properties.
+- Fixed problem making Production the default environment.
+
16.0.0
- Removed support for the v200902 Sandbox, which has been deco'ed.
- Added support for the v200906 Sandbox and Production environments.
View
@@ -1,18 +1,24 @@
#!/usr/bin/ruby
#
-# Copyright 2009, Google Inc. All Rights Reserved.
+# Authors:: sgomes@google.com (Sérgio Gomes)
+# jeffy@google.com (Jeffrey Posnick)
+# chanezon@google.com (Patrick Chanezon)
+# leavengood@gmail.com (Ryan Leavengood)
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Copyright:: Copyright 2009, Google Inc. All Rights Reserved.
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# License:: Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
#
# Rakefile for adwords4r.
@@ -34,9 +40,10 @@ require 'wsdl/soap/wsdl2ruby'
require 'xsd/codegen/classdef'
require 'adwords4r/services'
require 'adwords4r/apiextensions'
+require 'adwords4r/generator'
# Configure some constants and built-in tasks
-CURRENT_VERSION = '16.0.0'
+CURRENT_VERSION = '17.0.0'
PKG_VERSION = ENV['REL'] ? ENV['REL'] : CURRENT_VERSION
WSDLDIR = 'wsdl'
@@ -71,13 +78,10 @@ task :getwsdl do
version_name = "v#{version}"
mkdir_p File.join(WSDLDIR, version_name)
AdWords::Service.get_services(version).each do |service|
- if version <= 13
+ if version.is_a? Integer
+ subdir = AdWords::Service.get_subdir(version, service)
save(getfile("adwords.google.com",
- "/api/adwords/#{version_name}/#{service}Service?wsdl"),
- get_wsdl_file_name(version_name, service))
- else
- save(getfile("adwords.google.com",
- "/api/adwords/cm/#{version_name}/#{service}Service?wsdl"),
+ "/api/adwords/#{subdir}#{service}Service?wsdl"),
get_wsdl_file_name(version_name, service))
end
end
@@ -155,7 +159,7 @@ task :generate do
eval("require '#{File.join(gendir, "#{service_name}Driver.rb")}'")
wrapper_file = File.join(gendir, "#{service_name}Wrapper.rb")
File.open(wrapper_file, 'w') do |file|
- file.write(AdWords::Service.generate_wrapper_class(version, service))
+ file.write(AdWords::Generator.generate_wrapper_class(version, service))
end
puts "Generated #{version_name} #{service_name} wrapper: #{wrapper_file}"
end
@@ -282,12 +286,13 @@ else
s.name = 'adwords4r'
s.version = PKG_VERSION
s.summary = 'Client library for the AdWords API.'
- s.description = <<-EOS
-Adwords4r provides an easy to use way to access the AdWords API in Ruby.
-Currently the following AdWords API versions are supported:
- * V13
- * V200906
- EOS
+ description = "Adwords4r provides an easy to use way to access the " +
+ "AdWords API in Ruby.\nCurrently the following AdWords API versions " +
+ "are supported:"
+ AdWords::Service.get_versions.each do |version|
+ description += "\n * V#{version}"
+ end
+ s.description = description
# Files and dependencies
s.files = PKG_FILES.to_a
View
@@ -75,7 +75,7 @@ please set the HTTP_PROXY environment variable. For example, from your code:
=== 2.1 - Using the Sandbox and other environments:
-In order to use the v13 and v200906 sandboxes, make sure that the 'environment'
+In order to use the v13 and v2009 sandboxes, make sure that the 'environment'
parameter in the credentials is set to SANDBOX.
environment=SANDBOX
@@ -88,16 +88,23 @@ add it to the list of environments in runtime:
and then use it normally in your code:
credentials.environment = 'ENVIRONMENT_NAME'
+Make sure you only include the base URL, that is, the URL up until the "adwords"
+part, leaving the version and group out. Here's an example:
+ AdWords::Service::add_environment('SANDBOX', {
+ 13 => 'https://sandbox.google.com/api/adwords/',
+ 200906 => 'https://adwords-sandbox.google.com/api/adwords/'
+ }
-=== 2.2 - Mixing v13 and v200906:
-It's possible to access both the v13 and v200906 sandboxes or production
+=== 2.2 - Mixing v13 and v2009:
+
+It's possible to access both the v13 and v2009 sandboxes or production
environments simultaneously. Since both versions share a common backend storage,
-it is possible for your application to choose between v13 and v200906 services
+it is possible for your application to choose between v13 and v2009 services
at will, mixing and matching them.
The multiple_versions.rb code sample shows you how to build an application using
-v13 and v200906 services simultaneously.
+v13 and v2009 services simultaneously.
=== 2.3 - Logging:
View
@@ -4,4 +4,4 @@ useragent=APPLICATION_NAME
password=ADWORDS_PASSWORD
email=ADWORDS_MCC_LOGIN
clientEmail=OPTIONAL_CLIENT_LOGIN
-#alternateUrl=https://sandbox.google.com/api/adwords/v13/
+#environment=SANDBOX
View
@@ -35,6 +35,8 @@
<li><a href="../files/lib/adwords4r/utils_rb.html">lib/adwords4r/utils.rb</a></li>
+ <li><a href="../files/lib/adwords4r/generator_rb.html">lib/adwords4r/generator.rb</a></li>
+
<li><a href="../files/lib/adwords4r/v13/AccountServiceWrapper_rb.html">lib/adwords4r/v13/AccountServiceWrapper.rb</a></li>
<li><a href="../files/lib/adwords4r/v13/AdGroupServiceWrapper_rb.html">lib/adwords4r/v13/AdGroupServiceWrapper.rb</a></li>
@@ -57,18 +59,42 @@
<li><a href="../files/lib/adwords4r/v200906/AdGroupAdServiceWrapper_rb.html">lib/adwords4r/v200906/AdGroupAdServiceWrapper.rb</a></li>
+ <li><a href="../files/lib/adwords4r/v200906/AdGroupCriterionServiceWrapper_rb.html">lib/adwords4r/v200906/AdGroupCriterionServiceWrapper.rb</a></li>
+
<li><a href="../files/lib/adwords4r/v200906/AdGroupServiceWrapper_rb.html">lib/adwords4r/v200906/AdGroupServiceWrapper.rb</a></li>
- <li><a href="../files/lib/adwords4r/v200906/AdGroupCriterionServiceWrapper_rb.html">lib/adwords4r/v200906/AdGroupCriterionServiceWrapper.rb</a></li>
+ <li><a href="../files/lib/adwords4r/v200906/CampaignServiceWrapper_rb.html">lib/adwords4r/v200906/CampaignServiceWrapper.rb</a></li>
<li><a href="../files/lib/adwords4r/v200906/CampaignCriterionServiceWrapper_rb.html">lib/adwords4r/v200906/CampaignCriterionServiceWrapper.rb</a></li>
- <li><a href="../files/lib/adwords4r/v200906/CampaignServiceWrapper_rb.html">lib/adwords4r/v200906/CampaignServiceWrapper.rb</a></li>
+ <li><a href="../files/lib/adwords4r/v200909/AdExtensionOverrideServiceWrapper_rb.html">lib/adwords4r/v200909/AdExtensionOverrideServiceWrapper.rb</a></li>
<li><a href="../files/lib/adwords4r/v200906/CampaignTargetServiceWrapper_rb.html">lib/adwords4r/v200906/CampaignTargetServiceWrapper.rb</a></li>
+ <li><a href="../files/lib/adwords4r/v200909/AdGroupAdServiceWrapper_rb.html">lib/adwords4r/v200909/AdGroupAdServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/AdGroupCriterionServiceWrapper_rb.html">lib/adwords4r/v200909/AdGroupCriterionServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/AdGroupServiceWrapper_rb.html">lib/adwords4r/v200909/AdGroupServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/BulkMutateJobServiceWrapper_rb.html">lib/adwords4r/v200909/BulkMutateJobServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignCriterionServiceWrapper_rb.html">lib/adwords4r/v200909/CampaignCriterionServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignAdExtensionServiceWrapper_rb.html">lib/adwords4r/v200909/CampaignAdExtensionServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignServiceWrapper_rb.html">lib/adwords4r/v200909/CampaignServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignTargetServiceWrapper_rb.html">lib/adwords4r/v200909/CampaignTargetServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/GeoLocationServiceWrapper_rb.html">lib/adwords4r/v200909/GeoLocationServiceWrapper.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/InfoServiceWrapper_rb.html">lib/adwords4r/v200909/InfoServiceWrapper.rb</a></li>
+
<li><a href="../files/lib/adwords4r/v13/AccountService_rb.html">lib/adwords4r/v13/AccountService.rb</a></li>
+ <li><a href="../files/lib/adwords4r/v200909/TargetingIdeaServiceWrapper_rb.html">lib/adwords4r/v200909/TargetingIdeaServiceWrapper.rb</a></li>
+
<li><a href="../files/lib/adwords4r/v13/AdGroupService_rb.html">lib/adwords4r/v13/AdGroupService.rb</a></li>
<li><a href="../files/lib/adwords4r/v13/AdService_rb.html">lib/adwords4r/v13/AdService.rb</a></li>
@@ -99,6 +125,30 @@
<li><a href="../files/lib/adwords4r/v200906/CampaignTargetService_rb.html">lib/adwords4r/v200906/CampaignTargetService.rb</a></li>
+ <li><a href="../files/lib/adwords4r/v200909/AdExtensionOverrideService_rb.html">lib/adwords4r/v200909/AdExtensionOverrideService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/AdGroupAdService_rb.html">lib/adwords4r/v200909/AdGroupAdService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/AdGroupCriterionService_rb.html">lib/adwords4r/v200909/AdGroupCriterionService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/AdGroupService_rb.html">lib/adwords4r/v200909/AdGroupService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/BulkMutateJobService_rb.html">lib/adwords4r/v200909/BulkMutateJobService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignAdExtensionService_rb.html">lib/adwords4r/v200909/CampaignAdExtensionService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignCriterionService_rb.html">lib/adwords4r/v200909/CampaignCriterionService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignService_rb.html">lib/adwords4r/v200909/CampaignService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/CampaignTargetService_rb.html">lib/adwords4r/v200909/CampaignTargetService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/GeoLocationService_rb.html">lib/adwords4r/v200909/GeoLocationService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/InfoService_rb.html">lib/adwords4r/v200909/InfoService.rb</a></li>
+
+ <li><a href="../files/lib/adwords4r/v200909/TargetingIdeaService_rb.html">lib/adwords4r/v200909/TargetingIdeaService.rb</a></li>
+
</ul>
</div>
<div id="bodyContent">
@@ -108,24 +158,32 @@
<p>
Main namespace for all the client library&#8217;s modules and classes.
</p>
-<hr size="1"></hr><p>
-Copyright 2009, Google Inc. All Rights Reserved.
-</p>
-<p>
-Licensed under the Apache License, Version 2.0 (the &#8220;License&#8221;);
+<hr size="1"></hr><table>
+<tr><td valign="top">Authors:</td><td>sgomes@google.com (Sérgio Gomes) jeffy@google.com (Jeffrey Posnick)
+chanezon@google.com (Patrick Chanezon) leavengood@gmail.com (Ryan
+Leavengood)
+
+</td></tr>
+<tr><td valign="top">Copyright:</td><td>Copyright 2009, Google Inc. All Rights Reserved.
+
+</td></tr>
+<tr><td valign="top">License:</td><td>Licensed under the Apache License, Version 2.0 (the &#8220;License&#8221;);
you may not use this file except in compliance with the License. You may
obtain a copy of the License at
+
+<p>
+<a
+href="http://www.apache.org/licenses/LICENSE-2.0">www.apache.org/licenses/LICENSE-2.0</a>
</p>
-<pre>
- http://www.apache.org/licenses/LICENSE-2.0
-</pre>
<p>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &#8220;AS IS&#8221;
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions
and limitations under the License.
</p>
+</td></tr>
+</table>
<p>
Helper methods for loading and managing the available services.
</p>
@@ -153,6 +211,8 @@
<li><span class="type">MODULE</span> <a href="AdWords/Extensions.html">AdWords::Extensions</a></li>
+ <li><span class="type">MODULE</span> <a href="AdWords/Generator.html">AdWords::Generator</a></li>
+
<li><span class="type">MODULE</span> <a href="AdWords/Service.html">AdWords::Service</a></li>
<li><span class="type">MODULE</span> <a href="AdWords/Utils.html">AdWords::Utils</a></li>
@@ -161,6 +221,8 @@
<li><span class="type">MODULE</span> <a href="AdWords/V200906.html">AdWords::V200906</a></li>
+ <li><span class="type">MODULE</span> <a href="AdWords/V200909.html">AdWords::V200909</a></li>
+
<li><span class="type">CLASS</span> <a href="AdWords/API.html">AdWords::API</a></li>
<li><span class="type">CLASS</span> <a href="AdWords/AdWordsCredentials.html">AdWords::AdWordsCredentials</a></li>
@@ -169,16 +231,28 @@
<li><span class="type">CLASS</span> <a href="AdWords/Error.html">AdWords::Error</a></li>
- <li><span class="type">CLASS</span> <a href="AdWords/Pre200902HeaderHandler.html">AdWords::Pre200902HeaderHandler</a></li>
+ <li><span class="type">CLASS</span> <a href="AdWords/Pre2009HeaderHandler.html">AdWords::Pre2009HeaderHandler</a></li>
<li><span class="type">CLASS</span> <a href="AdWords/ResponseHandler.html">AdWords::ResponseHandler</a></li>
- <li><span class="type">CLASS</span> <a href="AdWords/V200906HeaderHandler.html">AdWords::V200906HeaderHandler</a></li>
+ <li><span class="type">CLASS</span> <a href="AdWords/V2009HeaderHandler.html">AdWords::V2009HeaderHandler</a></li>
</ul>
+ <div class="sectiontitle">Constants</div>
+ <table border='0' cellpadding='5'>
+
+ <tr valign='top'>
+ <td class="attr-name">HEADER_NAMESPACE</td>
+ <td>=</td>
+ <td class="attr-value">'https://adwords.google.com/api/adwords/cm/'</td>
+ </tr>
+
+
+ </table>
+
Oops, something went wrong.

0 comments on commit 19fe73e

Please sign in to comment.