Group: http://groups.google.com/group/adsense-api/topics
- Multiple channels per getAdCode request? [3 Updates]
- "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Apr 26 05:36AM -0700
Hi Sean,
The way this is done in all Google RESTful APIs is by specifying the
parameter multiple times. In your example, that would be something along
the lines of:
hostCustomChannelId=<first ID>&hostCustomChannelId=<second
ID>&hostCustomChannelId=<third ID>
Hope this helps!
Cheers,
Sérgio
---
Sérgio Gomes
Developer Relations
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
9TQ
Registered in England Number: 3977902
On Thursday, 25 April 2013 19:16:36 UTC+1, Sean wrote:
- "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Apr 26 06:12AM -0700
By the way, I forgot to mention, if you're using a client library, they
usually take care of this to you :) Just assign the array to that property,
and it will do the right thing.
Cheers,
Sérgio
---
Sérgio Gomes
Developer Relations
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
9TQ
Registered in England Number: 3977902
On Friday, 26 April 2013 13:36:36 UTC+1, Sérgio Gomes (AdSense API Team)
wrote:
- Sean <neolocutus@gmail.com> Apr 26 10:29AM -0700
Thanks, this worked.
$optt = array();
$optt['hostCustomChannelId'] = array();
$optt['hostCustomChannelId'][] = $adch;
if ($uc != '') {
$optt['hostCustomChannelId'][] = $uc;
}
$adzz = $adsensehostService->accounts_adunits->getAdCode($pubID,
$adClientID, $adUnitID, $optt);
Sean
On Friday, April 26, 2013 7:12:11 AM UTC-6, Sérgio Gomes (AdSense API Team)
wrote:
You received this message because you are subscribed to the Google Group adsense-api.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adsense-api+unsubscribe@googlegroups.com.
To post to this group, send email to adsense-api@googlegroups.com.
Visit this group at http://groups.google.com/group/adsense-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment