I don't know what was wrong with my selector but I resolved my problem
by looking on the "Sample code"
This is how I'm doing now :
selector = AdWords::V200906::CampaignService::CampaignSelector.new
stats_selector = {
:dateRange => {
:min => date_google_format,
:max => date_google_format,
}
}
selector.statsSelector = stats_selector
selector.campaignStatuses = 'ACTIVE'
On Jul 15, 6:11 pm, AdWords API Advisor <[email protected]>
wrote:
> Hello Vinczente,
>
> Could you try making two changes and see if you get any different
> results? Put quotes around the values for the date range (to ensure
> they're interpreted as strings, not numbers) and leave out the paging
> item entirely.
>
> Did that help any? I've successfully retrieved stats from v200906
> using Perl, but I haven't tried doing it in Ruby yet.
>
> Cheers,
> -Jeff Posnick, AdWords API Team
>
> On Jul 15, 9:32 am, Vinczente <[email protected]> wrote:
>
> > Hello,
> > I saw the "google official client" in ruby for 200906 is out !
> > I have some problems to retrieve the stats...
> > This is my selector :
>
> > selector = {
> > :ids => [],
> > :campaignStatuses=> ['ACTIVE'],
> > :statsSelector => {
> > :dateRange => {:min=> 20090715, :max => 20090715},
> > },
> > :paging => {:startIndex => 0, :numberResults=> 10000}
> > }
>
> > And this is the API reponse :
>
> > --- !ruby/object:AdWords::V200906::CampaignService::GetResponse
>
> > rval: !ruby/object:AdWords::V200906::CampaignService::CampaignPage
>
> > entries:
>
> > - !ruby/object:AdWords::V200906::CampaignService::Campaign
>
> > autoKeywordMatchingStatus: !
> > str:AdWords::V200906::CampaignService::AutoKeywordMatchingStatus
> > OPT_OUT
>
> > biddingStrategy: !ruby/
> > object:AdWords::V200906::CampaignService::ManualCPC
>
> > biddingStrategy_Type: ManualCPC
>
> > budget: !ruby/object:AdWords::V200906::CampaignService::Budget
>
> > amount: !ruby/object:AdWords::V200906::CampaignService::Money
>
> > comparableValue_Type: Money
>
> > microAmount: 100000
>
> > deliveryMethod: !
> > str:AdWords::V200906::CampaignService::BudgetBudgetDeliveryMethod
> > STANDARD
>
> > period: !
> > str:AdWords::V200906::CampaignService::BudgetBudgetPeriod DAILY
>
> > endDate: "20371231"
>
> > frequencyCap: !ruby/
> > object:AdWords::V200906::CampaignService::FrequencyCap
>
> > impressions: 0
>
> > id: 24164
>
> > name: Sample Campaign2
>
> > servingStatus: !
> > str:AdWords::V200906::CampaignService::ServingStatus SERVING
>
> > startDate: "20090706"
>
> > stats: !ruby/object:AdWords::V200906::CampaignService::Stats
>
> > network: !str:AdWords::V200906::CampaignService::StatsNetwork
> > ALL
>
> > stats_Type: Stats
>
> > status: !str:AdWords::V200906::CampaignService::CampaignStatus
> > ACTIVE
>
> > page_Type: CampaignPage
>
> > totalBudget: !ruby/object:AdWords::V200906::CampaignService::Budget
>
> > amount: !ruby/object:AdWords::V200906::CampaignService::Money
>
> > comparableValue_Type: Money
>
> > microAmount: 100000
>
> > deliveryMethod: !
> > str:AdWords::V200906::CampaignService::BudgetBudgetDeliveryMethod
> > STANDARD
>
> > period: !str:AdWords::V200906::CampaignService::BudgetBudgetPeriod
> > DAILY
>
> > totalNumEntries: 1
>
> > Why isn't there any stats? clicks and microAmount ? I would expect at
> > least a 0....
>
> > 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---