Using Ruby for Adwords API V 11

21 views
Skip to first unread message

Andrew - Helium

unread,
Oct 24, 2007, 1:54:55 PM10/24/07
to AdWords API Forum
Is anyone still using Ruby for the Adwords API? I've found only old
discussions about V6. Any examples about how to do it on a recent
version? Any speculation on why it isn't more popular?

Thanks,
Andrew

Ryan Leavengood

unread,
Oct 26, 2007, 1:19:24 PM10/26/07
to AdWords API Forum

I did most of the work to update adwords4r to use the newer soap4r
libraries and support V10 a while ago. It seems Jeffrey Posnick at
Google has stepped up to continue where I left off and added V11
support yesterday.

You can download the latest gem with V10 and V11 support here:

http://code.google.com/p/google-api-adwords-ruby/

I am not sure why more people don't use adwords4r, but it probably
just relates to how many people are using Ruby versus PHP and .NET,
etc. As much as I like Ruby, it still isn't as big as the other
languages.

Regards,
Ryan

AdWords API Advisor

unread,
Oct 26, 2007, 5:12:19 PM10/26/07
to AdWords API Forum
Ryan is correct-the updated Ruby gem is not yet uploaded to RubyForge,
but you can access the v10/v11 version of the libraries from the
Google Code site in the meantime.

The changes in this release are detailed at
http://google-api-adwords-ruby.googlecode.com/svn/trunk/ChangeLog.txt

I'll update this thread when the gem has made it to RubyForge. In the
meantime, please let us know if you encounter any issues using the
client library.

Cheers,
-Jeff Posnick, AdWords API Team

fly...@googlemail.com

unread,
Nov 7, 2007, 9:05:44 AM11/7/07
to AdWords API Forum

On Oct 26, 10:12 pm, AdWords API Advisor
<adwordsapiadvi...@google.com> wrote:

> The changes in this release are detailed at
> http://google-api-adwords-ruby.googlecode.com/svn/trunk/ChangeLog.txt

added support for the SiteSuggestionService for API v10 and v11 ???

am I missing something? the SiteSuggestionService should be in the
trunk right? I can see it :-/

AdWords API Advisor

unread,
Nov 7, 2007, 6:15:51 PM11/7/07
to AdWords API Forum
Apologies, the SiteSuggestionService code was in the packaged .gem
file but was not added to the SVN repository.

It has since been added. Let us know if you run into any issues.

Cheers,
-Jeff Posnick, AdWords API Team


On Nov 7, 6:05 am, "fly...@googlemail.com" <fly...@googlemail.com>
wrote:

AdWords API Advisor

unread,
Nov 9, 2007, 2:13:36 PM11/9/07
to AdWords API Forum
The new gem version of adwords4r, 11.0.2, has now been updated on
RubyForge. Assuming you have a properly configured ruby/gem
environment, you can install it automatically with the "gem install
adwords4r" command.

Cheers,
-Jeff Posnick, AdWords API Team


On Nov 7, 3:15 pm, AdWords API Advisor <adwordsapiadvi...@google.com>

Alan

unread,
Dec 4, 2007, 1:06:55 PM12/4/07
to AdWords API Forum
Jeff, I attempted to get adwords4r running and rant into some issues.
First it seems that the environmental variable "ADWORDS4R_DEBUG" is
required. I think this should be optional, so all that would need to
be done is check for a null value on line 81 of adwords4r.rb

Attempting to access the API this way didn't seem to work. I used the
developer token given to me along with my user/pass to adwords client
manager. I get an error of "Application information missing." when I
run this code:

adwords = AdWords::API.new(AdWords::AdWordsCredentials.new(
{ 'token' => 'mytoken',
'useragent' => 'P@ playing with the API from ruby',
'password' => 'mypasswd',
'email' => 'em...@example.com'}
))

print "result =
#{adwords.getFreeUsageQuotaThisMonth().getFreeUsageQuotaThisMonthReturn}"

RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace

c:/ruby/lib/ruby/gems/1.8/gems/adwords4r-11.0.2/lib/adwords4r.rb:81:in
`prepareDriver'

On Nov 9, 11:13 am, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:

Alan

unread,
Dec 4, 2007, 2:50:18 PM12/4/07
to AdWords API Forum
Sorry, I figured it out, looks like the requirements for
AdWordsCredentials have changed.

AdWords API Advisor

unread,
Dec 4, 2007, 4:59:36 PM12/4/07
to AdWords API Forum
Thanks for pointing out the ADWORDS4R_DEBUG issue-I've updated the
code in the Subversion repository to perform a nil? check before
attempting to convert the variable into uppercase. I'll update the Gem
as well.

Cheers,
-Jeffrey Posnick, AdWords API Team

AdWords API Advisor

unread,
Dec 13, 2007, 2:06:06 PM12/13/07
to AdWords API Forum
Just wanted to let the Ruby fans out there know that I've pushed the
adwords4r 11.0.3 Gem file out to RubyForge.

It addresses the ADWORDS4R_DEBUG issue and also updates the Gem
specification to require at least version 1.5.8 of soap4r.

Cheers,
-Jeffrey Posnick, AdWords API Team


On Dec 4, 4:59 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> Thanks for pointing out the ADWORDS4R_DEBUG issue-I've updated the
> code in the Subversion repository to perform a nil? check before
> attempting to convert the variable into uppercase. I'll update the Gem
> as well.
>
> Cheers,
> -Jeffrey Posnick, AdWords API Team
>
> On Dec 4, 2:50 pm, Alan <tala...@gmail.com> wrote:
>
> > Sorry, I figured it out, looks like the requirements for
> > AdWordsCredentials have changed.
>
> > On Dec 4, 10:06 am, Alan <tala...@gmail.com> wrote:
>
> > > Jeff, I attempted to get adwords4r running and rant into some issues.
> > > First it seems that the environmental variable "ADWORDS4R_DEBUG" is
> > > required. I think this should be optional, so all that would need to
> > > be done is check for a null value on line 81 of adwords4r.rb
>
> > > Attempting to access the API this way didn't seem to work. I used the
> > > developer token given to me along with my user/pass to adwords client
> > > manager. I get an error of "Application information missing." when I
> > > run this code:
>
> > > adwords = AdWords::API.new(AdWords::AdWordsCredentials.new(
> > > { 'token' => 'mytoken',
> > > 'useragent' => 'P@ playing with the API fromruby',
Reply all
Reply to author
Forward
0 new messages