Thursday, 3 February 2011

Ebay RSS feed APIing

This morning I had an email that a couple of my domains were up for renewal. They're £8.50 ea. with my current company, evohosting, so I decided to move them to goDaddy, which is more like £5 ea.

Unfortunately, when it came to goDaddy sending me an email I had to get a code from or something, they sent it to the admin contact listed for the domains, which is my current provider, and not me.

So I logged into the evohosting control panel and changed the admin contact email to mine, then pressed the re-send email link in the goDaddy control panel. But it resent the email to the old admin contact email still. I'm guessing that maybe the changes have to propagate like DNS changes.

I spent most of the morning testing different parameters for the ebay API RSS feed to see if I could find what they did. Some of the parameters are obvious by their names, and some I found descriptions of while searching for them yesterday. But there are other parameters that I couldn't find any info for. And when testing them today, these parameters seemed to make no difference.

I used PHP to download the RSS feed once with a parameter with one value (or not set), and also with the parameter with a different value. Then I used to compare (diff) facility in Komodo Edit to compare the two files. Sometimes there would be a 1 listing difference between two values for a parameter, but then if I ran the script again, there would be no difference. So the difference was just due to the few milliseconds between the first request and the second, not the parameter setting.

Here's the list of parameters:
  FeedName=SearchResults //feed type
  &dfsp=32 //seems to have no effect, optional
  &from=R6 //seems to have no effect, optional
  &nojspr=y //seems to have no effect, optional
  &fbfmt=1 //seems to have no effect, optional
  &output=RSS20 //Has no effect, but probably best to include in case ebay switch the feed format default to something else in the future
  &saaff=afepn //EPN affiliate
  &siteId=16 //Country (0=US 3=UK 146=NL 101=IT 203=IN 71=FR 186=ES 2=CA 23=BE 15=AU)
  &language=en-US //language
  &afepn= //CampaignID
  &customid=myCustomID //customID
  &satitle=dslr%20-excludedWord //search term
  &sacat=625 //categoryID
  &catref=C5 //seems to have no effect, optional
  &fts=2 //1=search title 2= search description as well
  &saprclo=500 //minPrice
  &saprchi=1000 //maxPrice
  &sacur=1 // apparently currency; 1 for US, 0 for any
  &ffsh=1 //Free Shipping only
  &sappl=1 //Paypal only
  &sabfmts=0&sascs=0 All Listings
  &sabfmts=1&sascs=1 Auction Only
  &sabfmts=2&sascs=2 Buy It Now Only
  //sort by
  &fsop=32&fsoo=2 Best Match
  &fsop=1&fsoo=1 Items Ending Soonest
  &fsop=2&fsoo=2 Newly Listed Items
  &fsop=34&fsoo=1 Shipping – Lowest First
  &fsop=34&fsoo=2 Shipping Higest First
  &fsop=11&fsoo=1 Nearest First
  &fsop=33&fsoo=2 Category
  &fpos= Zipcode/Postcode
  &sadis= Distance
  //specific seller
  //specific store
It doesn't appear that you can use any of the SearchResults parameters with the StoreItems feed.

In the afternoon I carried on working with the ebay RSS for my ebay wordpress plugin. One thing I found was how to get different sized thumbnails, which also works for the ebay API. The info is here: finding api : thumb size too small

For example, breaking down the following ebay item thumbnail url:
(this can be thumbs, thumbs1, thumbs2, thumbs3, or thumbs4)
(the item number)
(max height and width, can be 6464 for 64px, 8080 for 80px, leave it out for 96px, 4040 for 140px)
Probably a tracking code ebay uses, you can leave this out

In the evening I watched an episode of Magi Rangers with L and an episode of Let's Learn Japanese Basic I with Mauser and Bo.

No comments: