项目作者: ltfschoen

项目描述 :
Ruby on Rails app using OAuth2 and AdWords API
高级语言: Ruby
项目地址: git://github.com/ltfschoen/skag_server_rails.git
创建时间: 2017-07-05T11:12:56Z
项目社区:https://github.com/ltfschoen/skag_server_rails

开源协议:

下载


AdWords on Rails

Screenshots

alt tag

Google’s AdWords API service lets developers design computer programs that
interact directly with the AdWords platform. With these applications,
advertisers and third parties can more efficiently — and creatively — manage
their large or complex AdWords accounts and campaigns.

This program adapts the AdWords on Rails sample application that demonstrated how to access the AdWords API from within a Ruby on Rails environment. It is based on the Google Ruby
AdWords API client library
.

The application demonstrates the following:

  • Authorization against AdWords with OAuth schema and credentials re-use.
  • Simple service request (CampaignService.get) and displaying the results.
  • Basic AdHoc reporting functionality with downloads support.

AdWords

Setup

  1. ```
  2. subl config/adwords_api.yml
  3. ```
  4. * Start the server. Open in browser:
  5. ```
  6. rails server;
  7. open http://localhost:3000
  8. ```

Usage

To access AdWords data the app needs to be granted access by a
logged in user. The user is automatically redirected to a page with login prompt
when not yet authorized.

After being prompted with say SKAG Server Rails wants to Manage your AdWords campaigns, to grant access, click the ‘Proceed’ link. Ensure you are on the Google login
page, log in with your AdWords account credentials and select ‘Grant access’.

Note: Granting access to the application will only allow access to the AdWords
data for the account. Other services will not be accessible.

Once logged in you can retrieve the accounts list, select an account and browse
the campaigns list or download a report with the corresponding menu items.

Configuring the Ruby AdWords API library

To be able to use the AdWords API there are a few parameters that need to be
specified. The configuration file is located under the ‘config’ directory and
named adwords_api.yml.

For details regarding configuration directive please refer to the library
README
.

Production accounts

This demo is capable of accessing production accounts. Although the app doesn’t
perform any mutate operations, it is best to be careful especially if modifying it to include additional functionality.