WoW:USERAPI GetAuctionBuyout: Difference between revisions

(Typo fixing using AWB)
m (Move page script moved page USERAPI GetAuctionBuyout to USERAPI GetAuctionBuyout without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{userapi}}
{{userapi}}
 
'''GetAuctionBuyout''' is an API proposed by Tekkub as a standard for getting auction house buyout price recommendations from addons that are so capable.
'''GetAuctionBuyout''' is an API proposed by [[User:Tekkub|Tekkub]] as a standard for getting auction house buyout price recommendations from addons that are so capable.


Here's a possible implementation that assumes you have an internal function call '''MyGetAuctionPriceByItemName'''.
Here's a possible implementation that assumes you have an internal function call '''MyGetAuctionPriceByItemName'''.
Line 38: Line 37:


* [http://wow.curse.com/downloads/wow-addons/details/auctionlite.aspx AuctionLite] by Merial.
* [http://wow.curse.com/downloads/wow-addons/details/auctionlite.aspx AuctionLite] by Merial.
* [http://auctionator-addon.com Auctionator] by [[User:Zirco|Zirco]]
* [http://auctionator-addon.com Auctionator] by Zirco
* [http://wow.curse.com/downloads/wow-addons/details/vendor.aspx AuctionMaster] by [http://wow.curse.com/user/Profile.aspx?UserID=5937 Udorn]


== See also ==
== See also ==
* [[GetSellValue]]
* [[GetSellValue]]

Latest revision as of 04:49, 15 August 2023

This page documents a <i>user-defined API</i> that is provided by third-party addons.

AddOn defined functions < GetAuctionBuyout

GetAuctionBuyout is an API proposed by Tekkub as a standard for getting auction house buyout price recommendations from addons that are so capable.

Here's a possible implementation that assumes you have an internal function call MyGetAuctionPriceByItemName.


   local origGetAuctionBuyout = GetAuctionBuyout;
 
   function GetAuctionBuyout(item)		-- Tekkub's API
 
     local sellval;
 
     if (type(item) == "string" and MyGetAuctionPriceByItemName(item)) then
         sellval = MyGetAuctionPriceByItemName(item);
     end
 
     if (sellval == nil) then
         local name = GetItemInfo(item);
         if (name and MyGetAuctionPriceByItemName(name)) then
             sellval = MyGetAuctionPriceByItemName(name);
         end
     end
 
     if (sellval) then
          return sellval;
     end
 
     if (origGetAuctionBuyout) then
          return origGetAuctionBuyout(item);
     end
 
     return nil;
   end


GetAuctionBuyout is supported by:

See also