Prev | Current Page 166 | Next

David Berube

"Practical Reporting with Ruby and Rails"


'SearchInDescription'=>0, # Do not search inside of
# description, since it's easy to say
# "this item is like XYZ other item"
# in a description, thus throwing off our
# average.
# Return data parameters
'Schema' =>1, # Use eBay's new style XML schema instead of
# of the old, deprecated one.
'EntriesPerPage' =>100, # Return at most 100 entries.
# Note that for performance reasons,
# this code does not iterate through the pages,
# so it will calculate the average of
# only the first hundred items on eBay.
'PageNumber' =>1
}
if seller_id # If the caller does not pass a seller id,
# this function will search across all sellers.
params['IncludeSellers'] = URI.escape(seller_id)
# eBay usernames are currently limited to alphanumeric characters
# and underscores, so this may not be necessary, but it's escaped
# just in case.
end
url_path = "/restapi?" << params.map{|param, value| "#{param}=#{value}"}.join("&")
CHAPTER 6 n TRACKING AUCTIONS WITH EBAY 117
response_body = Net::HTTP.get($ebay_config[:ebay_address], url_path)
hpricot_doc = Hpricot.


Pages:
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
zakłady bukmacherskie swiat hotele londyn stolarka aluminiowa częstochowa ranking przeglądarek