Hello 

I would like to reproduce the process that is working in the following 
AdWordsAPI Gem with AdsAPI.
I am posting an example code.
If anyone knows how to reproduce it with AdsAPI, please let me know.

CodeSample1.

*require 'adwords_api*

*...*

*def example1*

*    @adwords_api = AdwordsApi::Api.new(Rails.configuration.adwords_auth)*

*    kind_of_service = :CampaignService*

*    @service = @adwords_api.service(kind_of_service, 
Rails.configuration.adwords_api_version)*

*    selector = {:fields=>["Id", "Name", "Status"], :predicates=>[], 
:ordering=>[{:field=>"Name", :sort_order=>"ASCENDING"}], 
:paging=>{:start_index=>1, :number_results=>1}}*

*    @service.get(selector)*

*  end*

*end*

Other values for :kind_of_service may include
:AdGroupAdService
:AdGroupCriterionService
:AdGroupService
AdwordsUserListService
There are also multiple patterns for selector.

Question2.

There is a section that uses download_report.
I would like to know how to reproduce this with AdsAPI.
The report_definition is an example of what is expected.

  *def example2*

*    adwords_api = AdwordsApi::Api.new(Rails.configuration.adwords_auth)*

*     ...*

*    reporter = 
adwords_api.report_utils(Rails.configuration.adwords_api_version)*

*    report_definition = {:selector=>{:fields=>["Date", "CampaignId", 
"AdGroupId", "Id", "CriterionId", "Device", "AdType", "Cost", 
"Impressions", "Clicks", "Conversions", "AveragePosition"], 
:date_range=>{:min=>"20221025", :max=>"20221025"}},*

* :report_name=>"AD_PERFORMANCE_REPORT",*

* :report_type=>"AD_PERFORMANCE_REPORT",*

* :date_range_type=>"CUSTOM_DATE",*

* :download_format=>"TSV"}*

*    raw_report = reporter.download_report(report_definition)*

*  end*




-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/95f301a1-8fed-40ed-9c0f-cb8599791c7bn%40googlegroups.com.
  • Ab... KimihiroMurayama
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... KimihiroMurayama

Reply via email to