I just added AdSense Management API sample in github
https://github.com/comewalk/google-api-perl-client/blob/master/eg/adsense
This sample is inspired by a thread in google-api-python-client group. Thanks!
So, you can try the sample like below.
$ git clone git://github.com/comewalk/google-api-perl-client.git $ cd google-api-perl-client.git # Edit Client ID and Client Secret in client_secrets.json $ vim eg/adsense/client_secrets.json $ ls eg/adsense/*.pl | xargs -n 1 perl -I lib
Then you will see like this.
Ad client for product xxxx with ID aaa-bbb-1234567890 was found Supports reporting: true and 'Yes' or 'No' Done Wide character in print at eg/adsense/adunits_list.pl line 39. Ad unit with code NNNNNNNNNN, name 300x250, 作成済み 10/06/07 and status INACTIVE was found Done Custom channel with code NNNNNNNNN and name http://www.s14u.info/mt/ was found Done == aaa-bbb-1234567890 == DATE PAGE_VIEWS AD_REQUESTS AD_REQUESTS_COVERAGE CLICKS AD_REQUESTS_CTR COST_PER_CLICK AD_REQUESTS_RPM EARNINGS 2011-01-24 1 1 1 0 0 N/A 0 0 2011-01-29 1 1 1 0 0 N/A 0 0 2011-03-31 2 2 1 0 0 N/A 0 0 2011-06-07 1 1 1 0 0 N/A 0 0 2011-06-09 1 1 1 0 0 N/A 0 0 2011-07-12 2 2 1 0 0 N/A 0 0 2011-08-04 18 18 1 0 0 N/A 0 0 2011-08-28 10 10 1 0 0 N/A 0 0 2011-08-29 11 11 1 0 0 N/A 0 0 2011-08-30 4 4 1 0 0 N/A 0 0 2011-09-08 1 1 1 0 0 N/A 0 0 2011-09-16 3 3 1 0 0 N/A 0 0 2011-09-26 2 2 1 0 0 N/A 0 0 Done URL channel with URL pattern comewalk.example.com was found Done
Also, I updated sample wiki page.
Enjoy!
No comments:
Post a Comment