AdWords API Google::Adwords v1.12 Perl module (support for v13)

2009-02-15 Thread Rohan Almeida


Hi,

I've released v1.12 of the Google::Adwords Perl module which now 
has support for v13 of the Adwords API. All my sandbox tests 
pass, so it should be an easy enough upgrade for you. Please use 
the cpan utility to upgrade. If not, you can download it from here -
http://search.cpan.org/CPAN/authors/id/R/RO/ROHAN/Google-Adwords-v1.12.tar.gz


If you face any problems due to the upgrade, don't hesitate to 
contact me directly.



Thanks,
Rohan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Perl / SOAP Adwords API problem

2009-02-15 Thread discodan

Hi all,

Would really appreciate your help. This is probably more of a Perl /
SOAP than adwords API question, but I've spent hours trawling the
internet for an answer to this and cannot find it, so I'm hoping you
can help :). I'm relatively new to Perl and SOAP, and I'm trying to
implement a connection to the Google Adwords API using SOAP::Lite. I
have it almost working but however I try and get a return value from
SOAP::SOM (e.g. using valueof or result) I only seem to get the last
element. Even calling valueof(//Body) just gives me one element. I
have tried debugging the code and using Dumper, but the SOAP::Lite
code is quite unreadable (at least to me :)
and I can't work out whats going on. I've tried implementing this
directly both using SOAP::Lite and via Google::Adwords, and they both
have the same behaviour.

This what I get from valueof(//Body):

$VAR1 = {
'getKeywordVariationsResponse' = {

'getKeywordVariationsReturn' = {

'moreSpecific' = {

'searchVolumeScale' = '2',

'language' = '',

'text' = 'trusted places 1',

'advertiserCompetitionScale' = '3'

}

}
}
};

But I know there is more than one KeywordVariation from using Dumper
on the SOAP::SOM object.

This is the code I am using, its basically the example provided by
Google:

use strict;
use warnings;
use English '-no_match_vars';
use SOAP::Lite;
use Data::Dumper;
binmode(STDOUT, ':utf8');

# Provide AdWords login information.
my $email = '';
my $password = '';
my $client_email = 'client_1+dan.j.rog...@gmail.com';
my $useragent = 'QYPE: AdWords API Perl Sample Code';
my $developer_token = 'dan.j.rog...@gmail.com++usd';
my $application_token = 'INSERT_APPLICATION_TOKEN_HERE';

# Set up service connection with autotyping disabled and fault handler
# registered. To send requests to production environment, replace
sandbox with
# adwords. To view XML request/response, uncomment
# SOAP::Lite-import(+trace = 'debug');.
my $url =
sprintf('https://%s.google.com/api/adwords/v12/KeywordToolService',
'sandbox');

my $wsdl = $url . '?wsdl';

my $service =
SOAP::Lite-service($wsdl)-autotype(0)-readable(1)-proxy($url);

$service-on_fault(sub {
my $response = $ARG[1];
die('The following SOAP fault occurred:', \n,
' faultcode: ', $response-faultcode(), \n,
' faultstring: ', $response-faultstring(),
\n)
});
SOAP::Lite-import(+trace = 'debug');

# Define SOAP headers.
my @headers = (
SOAP::Header-name('email' = $email),
SOAP::Header-name('password' = $password),
SOAP::Header-name('clientEmail' = $client_email),
SOAP::Header-name('useragent' = $useragent),
SOAP::Header-name('developerToken' = $developer_token),
SOAP::Header-name('applicationToken' = $application_token)
);

# Create seed keyword structure.
my $seed_keyword = {
'negative' = 'false',
'text' = 'trusted places',
'type' = 'Broad',
};

my $seed_keywords = SOAP::Data-name('seed_keywords' =
[$seed_keyword]);
my $use_synonyms = SOAP::Data-name('useSynonyms' = 'true');
my $languages = SOAP::Data-name('languages' = ['en']);
my $countries = SOAP::Data-name('countries' = ['US']);

# Get keyword variations.
my $variation_lists = $service-call('getKeywordVariations' =
$seed_keywords,
$use_synonyms, $languages, $countries, @headers);

print Dumper($variation_lists);

my @data = $variation_lists-valueof(//Body);

foreach my $data_word (@data){
print Dumper($data_word);
}

If anyone knows where I am going wrong I'd be most grateful!

Thanks for your help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API keyword delete when we delete ad

2009-02-15 Thread PSPL Noida

Hello

When we create a new ad in that case first of all we delete the old
and create new.Now tell me when we delete the old ad in that case
keyword is delete or not.
 is there  any way to retain keywords in updation of ad text.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API php/ my first journey to use Adwords api

2009-02-15 Thread ainihong001

i have got developer_token and application_token,
i use the demo of get_keyword_variations.php .

But it returns List of additional keywords to consider has 0
variation
(s). List of popular queries with given seed has 0 variation(s).,
it shows maybe the method of getKeywordVariations not work rightly.


 i use the code of get_keyword_variations.php below:

# Provide AdWords login information.
$email = 'INSERT_LOGIN_EMAIL_HERE';
$password = 'INSERT_PASSWORD_HERE';
$client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE';
$useragent = 'INSERT_COMPANY_NAME: AdWords API PHP Sample Code';
$developer_token = 'INSERT_DEVELOPER_TOKEN_HERE';
$application_token = 'INSERT_APPLICATION_TOKEN_HERE';
# Define SOAP headers.
$headers =
  'email' . $email . '/email'.
  'password' . $password . '/password' .
  'clientEmail' . $client_email . '/clientEmail' .
  'useragent' . $useragent . '/useragent' .
  'developerToken' . $developer_token . '/developerToken' .
  'applicationToken' . $application_token . '/applicationToken';
# Set up service connection. To view XML request/response, change
value of
# $debug to 1. To send requests to production environment, replace
# sandbox.google.com with adwords.google.com.
$namespace = 'https://adwords.google.cn/api/adwords/v12';
$keyword_tool_service = SoapClientFactory::GetClient(
  $namespace . '/KeywordToolService?wsdl', 'wsdl');
$keyword_tool_service-setHeaders($headers);
$debug = 1;
# Create seed keyword structure.
$seed_keyword =
  'negativefalse/negative' .
  'texttea/text' .
  'typeBroad/type';
$use_synonyms = 'useSynonymstrue/useSynonyms';
# Get keyword variations.
$request_xml =
  'getKeywordVariations' .
  'seedKeywords' . $seed_keyword . '/seedKeywords' .
  $use_synonyms .
  'languagesen/languages' .
  'countriesUS/countries' .
  '/getKeywordVariations';
$variation_lists =
  $keyword_tool_service-call('getKeywordVariations', $request_xml);
$variation_lists = $variation_lists['getKeywordVariationsReturn'];
if ($debug) show_xml($keyword_tool_service);
if ($keyword_tool_service-fault) show_fault($keyword_tool_service);
# Display keyword variations.
$to_consider = $variation_lists['additionalToConsider'];
echo 'List of additional keywords to consider has ' . count
($to_consider) .
  ' variation(s).' . \n;
$more_specific = $variation_lists['moreSpecific'];
echo 'List of popular queries with given seed has ' . count
($more_specific) .
  ' variation(s).' . \n;
function show_xml($service) {
  echo $service-request;
  echo $service-response;
  echo \n;
}

function show_fault($service) {
  echo \n;
  echo 'Fault: ' . $service-fault . \n;
  echo 'Code: ' . $service-faultcode . \n;
  echo 'String: ' . $service-faultstring . \n;
  echo 'Detail: ' . $service-faultdetail . \n;
  exit(0);
}

?

tks
helping me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---