Auction API: Getting wrong realm auction batch
aanc opened this issue · 1 comments
aanc commented
Hello,
On EU realms, when downloading the batch from the URL returned by the /api/wow/auction/data/<realm>
call, I get the data for another realm:
ownerRealm seems to be correct, but realm.name is not.
Example:
$ curl http://eu.battle.net/api/wow/auction/data/medivh
{"files":[{"url":"http://eu.battle.net/auction-data/57304a565824f2d778f9ad106430c98c/auctions.json","lastModified":1412860949000}]}%
$ curl -s http://eu.battle.net/auction-data/57304a565824f2d778f9ad106430c98c/auctions.json | head
{
"realm":{"name":"Suramar","slug":"suramar"},
"alliance":{"auctions":[
{"auc":1407583153,"item":82445,"owner":"Démoniakke","ownerRealm":"Medivh","bid":833200,"buyout":833200,"quantity":1,"timeLeft":"VERY_LONG","rand":0,"seed":75344768},
{"auc":1407398207,"item":52721,"owner":"Meny","ownerRealm":"Medivh","bid":1500000,"buyout":1500000,"quantity":5,"timeLeft":"VERY_LONG","rand":0,"seed":587485066},
{"auc":1408217593,"item":72234,"owner":"Wyskie","ownerRealm":"Medivh","bid":1399999,"buyout":1400000,"quantity":20,"timeLeft":"VERY_LONG","rand":0,"seed":1664512512},
{"auc":1408136378,"item":83007,"owner":"Gàlly","ownerRealm":"Medivh","bid":391875,"buyout":412500,"quantity":1,"timeLeft":"LONG","rand":0,"seed":1840526976},
{"auc":1407820417,"item":21877,"owner":"Telia","ownerRealm":"Medivh","bid":24000,"buyout":50000,"quantity":20,"timeLeft":"LONG","rand":0,"seed":1863355776},
{"auc":1406696962,"item":42751,"owner":"Sîlentspy","ownerRealm":"Suramar","bid":3500000,"buyout":3500000,"quantity":1,"timeLeft":"LONG","rand":0,"seed":987790848},
{"auc":1407764212,"item":82800,"owner":"Ducius","ownerRealm":"Medivh","bid":13250000,"buyout":14500000,"quantity":1,"timeLeft":"VERY_LONG","rand":0,"seed":1191489024,"petSpeciesId":145,"petBreedId":3,"petLevel":1,"petQualityId":2},
matomesc commented
That is because Suramar and Medivh are connected realms. The following calls will both return a link to the same auction house data:
$ curl http://eu.battle.net/api/wow/auction/data/medivh
{"files":[{"url":"http://eu.battle.net/auction-data/57304a565824f2d778f9ad106430c98c/auctions.json","lastModified":1412947949000}]}
$ curl http://eu.battle.net/api/wow/auction/data/suramar
{"files":[{"url":"http://eu.battle.net/auction-data/57304a565824f2d778f9ad106430c98c/auctions.json","lastModified":1412947949000}]}
If you're trying to determine which realm the auction was actually created on, use the ownerRealm
property on the auction objects.