Restore support for GetAuctionBuyout
kemayo opened this issue ยท 1 comments
Before the big post-8.3 rewrite, Auctionator supported the user-invented GetAuctionBuyout API. This was convenient for other addons that wanted to ask about buyout prices, because they didn't need to care about what auction addons the user had installed. Sadly, this was removed in 1da253f. (There was also GetSellValue, but that's not needed any more in retail.)
Describe the solution you'd like
Add the following somewhere appropriate in Auctionator:
local origGetAuctionBuyout = GetAuctionBuyout
function GetAuctionBuyout (item)
local value
if type(item) == "string" then
value = Auctionator.API.v1.GetAuctionPriceByItemLink("GetAuctionBuyout", item)
else
value = Auctionator.API.v1.GetAuctionPriceByItemID("GetAuctionBuyout", item)
end
if origGetAuctionBuyout and not value then
value = origGetAuctionBuyout(item)
end
return value
end
(Or more-directly call the internals, I guess.)