Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
gagan_kumar
Level 7

how to use multiple ads using RAF (Roku Ad Framework)

I am using VAST sample XML for ads. I am using multiple xml files to get adds from different sources.

adIface = Roku_Ads()
adIface.setAdUrl("http://10.111.133.22:9000/abc.xml")
adPods = adIface.getAds()
adIface.setAdUrl("http://10.111.133.22:9000/def.xml")
adPods = adIface.getAds()
adIface.setAdUrl("http://10.111.133.22:9000/ghi.xml")
adPods = adIface.getAds()
adIface.setAdUrl("http://10.111.133.22:9000/jkl.xml")
adPods = adIface.getAds()

' While printing ads , we are getting single ad from abc.xml file.

print "***********************************"
print "***********************************"
print "***********************************"
for each ar in adPods
print "ads:::::::: " formatJSON(ar,0)
end for

print "***********************************"
print "***********************************"
print "****

' While defining multiple ads in single xml file ( for eg: all ads in xyz.xml) , we are getting top ad element defined in xyz.xml

adIface = Roku_Ads()
adIface.setAdUrl("http://10.111.133.22:9000/xyz.xml")
adPods = adIface.getAds()


I want to know how to get multiple ads from different sources or single source and returned in adPods array.
0 Kudos