Class: Linkshare::AdvertiserSearch

Inherits:
Object
  • Object
show all
Defined in:
lib/linkshare/advertiser_search.rb

Instance Method Summary collapse

Instance Method Details

#getAdvertisers(merchantname = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/linkshare/advertiser_search.rb', line 3

def getAdvertisers(merchantname = nil)
   urlparam = ''
   if merchantname != nil
     urlparam = '?merchantname='+merchantname
   end
	l = Linkshare::Response.parse(Linkshare::Request.get(Linkshare::API_URIS[:advertiser_search]+urlparam))
   if l['result'].has_key?('midlist')
     l['result']['midlist']['merchant']
   else 
     return {}
   end
end