레이블이 client libraries인 게시물을 표시합니다. 모든 게시물 표시
레이블이 client libraries인 게시물을 표시합니다. 모든 게시물 표시

UPDATE2: Developer Token Required In Report Downloads

월요일, 11월 14, 2011


A little over a week ago we published a blog post informing developers that we would begin requiring a developer token with report downloads to better allow us to monitor reports, and extended the deadline in an update. We are changing the deadline to Tuesday January 17th, 2012 to give our developers more time during the busy holiday season.

As mentioned in our prior update, the sandbox will still have this change as of November 16th. We strongly encourage you to use the time between November 16th and January 17th to make the change to your applications, test against the sandbox and move the change to production. The existing production report download will ignore the header until it is required, which means you can implement the changes before the deadline without it breaking your existing applications.

We will update the client libraries to help you implement this change before the November 16th change in the sandbox environment. Please see our report download documentation for more information regarding report downloads. If you have any questions or would like to discuss this change, please post on the forum or try to attend our Google+ Hangouts with members of the AdWords API Developer Relations Team.

, AdWords API Team

UPDATE: Developer Token Required In Report Downloads

화요일, 11월 08, 2011


Last Thursday we published a blog post informing developers that we would begin requiring a developer token with report downloads.  Due to developer feedback regarding the proposed date being so close to the upcoming Thanksgiving holiday in the US, we are changing the deadline to Tuesday November 29th.

We’d also like to clarify two additional points:

  • We will start requiring the developer token as an HTTP header for report downloads in the sandbox as of November 16th.  This will allow developers to make requests with the developer token as an HTTP header to ensure their application will continue to function as expected when the production server begins requiring the developer token.
  • While the production service will begin requiring the developer token on November 29th, you can provide this HTTP header today and the server will still accept the request.  This means you can add the developer token in advance of the deadline without fear that report download functionality will be interrupted.
We will update the client libraries to help you implement this change before the November 16th change in the sandbox environment.  Please see our report download documentation for more information regarding report downloads.  If you have any questions or would like to discuss this change, please post on the forum or try to attend our Google+ Hangouts with members of the AdWords API Developer Relations Team.

, AdWords API Team

ACTION REQUIRED: Developer Token Required In Report Downloads Starting 11/23

목요일, 11월 03, 2011


We would like to announce an important change to the process of downloading reports from the AdWords API that will affect all report downloads for tools built on API versions post v13.  Currently, downloading reports costs no API units and has previously not required a developer token.  To allow us to better monitor usage of reports, we will start requiring a developer token when downloading reports.  Downloading reports will still cost zero API units.

All report downloads - whether they be AdHoc or pre-v201109, using either GET or POST - must provide the developer token as an HTTP header. Example formatting of header:

developerToken: 1a2B3c4D5e_-6v7w8x9y0z

If your application fails to provide the developer token as an HTTP header after November 23rd, it will receive the error message QuotaCheckError.INVALID_TOKEN_HEADER when downloading reports.

We will be publishing updates to the example and utility code in the client libraries to reflect this change.  Please see our report download documentation for more information regarding report downloads.  If you have any questions or would like to discuss this change, please post on the forum or try to attend our Google+ Hangouts with members of the AdWords API Developer Relations Team.

Kevin Winter, AdWords API Team

Client Library Updates

수요일, 11월 02, 2011


We have recently released new versions of the AdWords API client libraries to support v201109 and AdHoc reports.  Please see below for a summary of changes for each library.

Java
  • Support for v201109 was added along with utility code for AdHoc reports in v8.4.0.
  • Released reference implementation to download reports for lots of client accounts.
DotNet
  • Support for v201109 was added along with utility code for AdHoc reports in v13.0.0.
Python
  • Project hosting has moved here.
  • Support for v201109 was added along with utility code for AdHoc reports in v15.0.3.
  • Updated common module from version 2.1.0 to version 3.0.0, which may impact your code.  See the ChangeLog for more details.
Ruby
  • Support for v201109 was added along with utility code for AdHoc reports in v0.4.1.
  • Now properly handles xsi:type in XML responses.
Perl
  • Support for v201109 was added along with utility code for AdHoc reports in v2.5.0.
PHP
  • Support for v201109 was added along with utility code for AdHoc reports in v2.7.0.
  • Bug fixes and minor improvements.
JavaScript
  • Support for v201109 was added along with an example for AdHoc reports in v1.1.0.
You can download updated versions of the AdWords API client libraries from their respective sites, or see a list of all the client libraries.
If you have any questions or would like to discuss these changes, please post on the forum.


Kevin Winter, AdWords API Team

AdWords API now fully supports OAuth 1.0a

화요일, 10월 11, 2011


With the release of v201109 we are happy to announce that we now fully support OAuth 1.0a in the AdWords API.

OAuth is an open standard for authorization. Google uses this standard to allow applications to access a user’s data (in this case AdWords) without requiring the user to give the application their Google username and password.

In OAuth, an application starts by contacting Google with an OAuth request. Next, the application redirects the user to Google to authorize the request. Once authorized, the user is directed back to the application, which can then upgrade their request token to an access token which the application can use to make requests to Google in lieu of a username and password.

The client libraries have code to handle much of the OAuth process for you. We have provided code examples in many languages to demonstrate how to use OAuth with the client libraries: DotNet, Python, Ruby, Perl, PHP.

Please note that making your first request against the sandbox using OAuth will not create accounts for you as described here. Please make your first request to the sandbox using email/password authentication to provision the sandbox accounts and make subsequent requests with OAuth.

For more information about using OAuth with Google APIs, please see this documentation.

If you have any questions about using OAuth with the client libraries, you can ask us on the forum.

Edit: the link describing how accounts are provisioned for you in the AdWords API sandbox was omitted in the original blog post.  This link has been updated and is located here.

, AdWords API Team

Client Library Updates

월요일, 9월 19, 2011


We have recently made the following changes to the AdWords client libraries.

Ruby

  • Made performance improvements.
  • Added unit spend information to responses.
  • Added support for Proxy servers.

Python

  • Updated common module to version 2.1.0, which may impact your code. See the ChangeLog for more details.
  • Fixed issues 161, 162, 163 in version 14.2.3.
  • Added a tarball in the download section that collects all the required modules for this client library into a single download with an installer script.

You can download updated versions of the AdWords API client libraries from their respective sites, or see a list of all the client libraries.

If you have any questions or would like to discuss these changes, please post on the forum.

, AdWords API Team

Client Library Updates

화요일, 8월 16, 2011


This is another edition of our bi-weekly client library updates blog post.

DotNet
  • Client library now supports OAuth 1.0a as an authentication mechanism.
  • Added support for caching authTokens.
  • Will now automatically retry for GOOGLE_ACCOUNT_COOKIE_INVALID error.
  • Additionally, a number of issues were fixed: 51, 62, and 65.
PHP
  • Support has been added to generate classes from the WSDL using pseudo-namespaces, to avoid conflicts with other classes. The library must be built from source with this option. Please see the README for more information. This addresses issue 4.
  • Improved type conversion to better handle ID values on 32-bit systems. This addresses issue 62.
Ruby
  • First release based on Savon backend (0.4.0).
  • Includes OAuth 1.0a support and Ruby 1.9 compatibility.
You can download updated versions of the AdWords API client libraries from their respective sites, or see a list of all the client libraries.

If you have any questions or would like to discuss these changes, please post on the forum.

Kevin WinterAdWords API Team

Client Library Updates

수요일, 7월 20, 2011


We often make changes to the AdWords API client libraries that do not merit a full blog post. We’d like to start publishing a summary blog post every other week to highlight changes that might otherwise go unnoticed.

Python

  • Added support for OAuth as an authentication mechanism. This will allow developers to access the API without requiring a username and password. See the new code example for more information on how to integrate OAuth with your application.
  • Additionally, a number of issues were fixed: 115, 142, 144, and 145.

Perl

  • Fixed some bugs that prevented usage of multiple Client objects.
  • Full XPath support was added; XPath queries can now be done through the entire tree of results.
  • OAuth support was also added.

Ruby

  • Improved support for UTF reports in download extensions.
  • New logger interface.
  • Updates have been made to the code examples.

PHP

  • Updated OAuth support to allow for alternative OAuth libraries, including the bundled Andy Smith library.
  • The logging functionality has been updated to support filtering for levels. The default logging behavior has been changed to only log SOAP XML if an error occurs.
  • New methods were added to AdWordsUser for additional logging configuration. The AdWords Get*Service() methods were replaced with a single GetService() method. Backwards compatibility was maintained using __call(). All examples and tests were updated to use the new method.
  • Additionally, 2 issues were fixed: 55 and 59.


You can download updated versions of the AdWords API client libraries from their respective sites, or see a list of all the client libraries using this link.

If you have any questions or would like to discuss these changes, please post on the forum.

Kevin Winter, AdWords API Team

AdWords API JavaScript library - Getting started

금요일, 6월 17, 2011


Recently, we launched the AdWords API JavaScript Client library. This blog post discusses its basic usage by explaining the GetAllCampaigns example.

Including required scripts

AdWords API JS library comes with the following compiled scripts that you can include in your web page:

  • awapi.js: This is the AdWords API JS library, combined into a single script.
  • v201101.js: This is the compiled script for AdWords API v201101. There are compiled scripts for each supported API version.
  • config.js: This is optional; if included, you can define your application configuration in this file.
Importing the required types

To use any type provided by the AdWords API JS library, you need to import it. For instance, to import the CampaignService object, use
<script type="text/javascript">
  goog.require('google.ads.adwords.v201101.CampaignService');
</script>
All the goog.require statements should be put together in a single <script> tag.

Creating a User and obtaining a service instance

In the AdWords API JS library, each AdWords account is represented using a User object. The User object allows you to create various services provided by the AdWords API and make calls against the AdWords account associated with this user. The code to do this is given below:
var user = new google.ads.adwords.User();
var campaignService = user.getService(google.ads.adwords.AdWordsService.v201101.
    CampaignService);
The user takes a config object as its constructor argument. If you don't provide one, then the config definition from config.js is used.

Calling the method and displaying results

The code to construct a selector and get all the campaigns is shown below:
// Create a selector.
var selector = new google.ads.adwords.v201101.Selector();
selector.fields = ["Id", "Name", "Status"];

campaignService.get(selector,
    goog.bind(function(page) {
      if (page && page.entries && page.entries.length > 0) {
        for (var i = 0, len = page.entries.length; i < len; i++) {
          var campaignValue = page.entries[i];
          alert(goog.string.format('Campaign with id = "%s", name = "%s" ' +
              'and status = "%s" was found.', campaignValue.id,
              campaignValue.name, campaignValue.status));
        }
      } else {
        alert('No campaigns were found.');
      }
      callback();
    }, this),
    goog.bind(function(soapException) {
      alert(goog.string.format('Failed to get campaign(s). Soap Fault ' +
         'says "%s"', soapException.getInnerException().getFaultString()));
         callback();
    }, this)
);
The important thing to note here is that unlike other languages, JavaScript client library implements all API calls as asynchronous methods. Each method accepts an onSuccess callback and an onFailure callback which will be called when a call succeeds or fails respectively. The prototype of onSuccess and onFailure callbacks are as shown below:
function onSuccess(results) {
}

function onFailure(soapException) {
  // soapException is an object of type ApiException
}
Setting up an HttpWebTransport

To make the AdWords API calls, the client library needs to POST xml data to the AdWords API Server. The exact mechanism for making these calls depend on the environment your code is running. You can set an appropriate HttpWebTransport in your config.js to tell the client library how to make its calls to the AdWords API server. The relevant snippet is given below:
HttpWebTransport: 'google.system.net.HttpWebTransportForServerProxy',
HttpWebTransportSettings: {
   ProxyUrl: '/awapi-js-lib/proxy.php'
}
When writing code for a normal website, you need to use HttpWebTransportForServerProxy as transport mechanism. This HttpWebTransport forwards your calls through a server-side proxy script. This is required since all modern browsers implement same origin policy that prevents the library from making a cross-domain XmlHttpRequest.

When writing code for a Chrome extension, you can make cross-domain xhr calls, if the domain is specified in the manifest file. In such cases, you can use HttpWebTransportForExtensions instead. You can refer to the README file for details on various HttpWebTransports provided by the library.

Please join us on the AdWords API forum to discuss the new client library and the Chrome extension and report any bugs on the project’s issue tracker or forum.

  --Anash P. Oommen, AdWords API Team

New client library launch: AdWords API JavaScript library

금요일, 6월 10, 2011


We are excited to announce the release of a new AdWords API JavaScript client library. The AdWords API JavaScript library allows you to develop JavaScript applications and browser extensions that use the AdWords API. The client library is built using Google’s Closure library, and is compatible with other major JavaScript libraries like jQuery, Dojo, etc.

Getting the AdWords API JS library

The AdWords API JS library is listed on the AdWords API client libraries page, and is hosted at http://code.google.com/p/google-api-adwords-js.

The library distribution is available for download from the downloads page: http://code.google.com/p/google-api-adwords-js/downloads/list.

You can find installation and running instructions as well as usage examples on the project wiki page: http://code.google.com/p/google-api-adwords-js/wiki/Readme


Features

The following are the main features of the AdWords API JS library:

  • Full support for AdWords API versions v201008 and v201101.
  • Code examples for all the common AdWords tasks, similar to other client libraries.
  • Tested to work in Internet Explorer, Firefox, and Chrome. See the project wiki for details.
  • Includes minified JS scripts, compiled and optimized using the Closure compiler.
  • JSDoc documentation for the entire library.


Sample AdWords API JS Chrome extension

We believe that Chrome and Firefox browser extension developers will benefit most from this client library. Keeping this in mind, we developed a Chrome extension that allows an AdWords user to browse his Campaigns, Ad Groups, Ads and Keyword statistics. The extension is being made available as a code example at this address. You can refer to the wiki article at http://code.google.com/p/google-api-adwords-js/wiki/ObjectStatsExtensionReadme for details on its installation and use.






Please join us on the AdWords API forum to discuss the new client library and the Chrome extension and report any bugs on the project’s issue tracker or forum.

- Anash P. Oommen & David Torres, AdWords API Team.

Discover v2009: New Examples in Client Libraries

금요일, 12월 11, 2009


Our Discover v2009 series has focused on introducing you to the new services and objects that come with the update to the API. And while we hope these posts have been informative we know there is nothing like running a code example yourself to bring the concepts to life. That's why we've spent the last few weeks completely re-hauling the examples in our client libraries to provide a more complete set of sample code to try out. The following client libraries now have over 30 examples for the v200909 version of the API:

If you haven't tried out the v2009 API there is no better time to get started. With our client libraries you can go from download to making requests in under five minutes, and the built-in logging and utility classes make learning v2009 a breeze. Many client libraries (Java, .NET, Python, and Ruby) even come bundled with v13 support, allowing you to take advantage of new v2009 features without having to update your entire application at once.

As always, we are here to answer your questions, collect feedback, and assist with migration to the v2009 API.

- Eric Koleda, AdWords API Team

Client Library Updates: Part 1

목요일, 5월 14, 2009


There are a lot of changes going on with the AdWords API lately and we'd like to take a minute to talk about what else we have in store. In recent news, we released the API v2009 Sandbox and we appreciate all the great feedback we are getting (keep it coming!). With the release the v200902 API, we also have begun updating the client libraries for each of the supported languages. The client libraries have always made it simple for both first time developers and experts to use our API and we are now adding even more features to improve your API experience.

Above all, we want to allow you to experiment with the API v2009 Sandbox while still being able to make production calls to the v13 version. To that extent, each client library now has cross-version compatibility so that v200902 code and v13 code can be run together. It still stands, though, that v200902 can only operate within the Sandbox. Included in each client library are some examples showing you how to use the v13 code along with v200902 to supplement your learning.

In addition to our existing list of supported client libraries, a new Perl client library, found here http://code.google.com/p/google-api-adwords-perl/, has been developed specifically for use with v200902. This library does not include support for the v13 services, but it does offer most of the functionality that our other client libraries offer.

The support for v200902 in the APIlity (PHP) client library is in the works as well.

Here's some other features that you'll find in the new refresh of each client library:

  • Improved logging support.
  • Reports can now be downloaded through the client library.
  • Full support for UTF-8 encoding.
  • Thread-safe architecture.

As always, you can find a list of supported client libraries here: http://code.google.com/apis/adwords/docs/clients.html

We'll be releasing more features as the client library update continues, so stay tuned!

-- Adam Rogal, AdWords API Team