WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Auction House API (https://www.wowinterface.com/forums/showthread.php?t=57892)

doofus 03-29-20 01:38 AM

Auction House API
 
Hello, has anyone got some semi-decent documentation on the AH API? I am trying to do simple things, like find all auctions for a particular item.

myrroddin 03-29-20 09:17 AM

https://wow.gamepedia.com/World_of_W...#Auction_House for the API

https://wow.gamepedia.com/Events#C_AuctionHouse for the events

doofus 03-29-20 03:06 PM

Thanks I have already looked at these but they were too cryptic to understand. I did call an easy one, C_AuctionHouse.CloseAuctionHouse(); that worked OK :)

But I have no idea how to browse , for example I did this:

C_AuctionHouse.ReplicateItems(
-- name
"Anchor Weed",
-- minlevel, maxlevel
nil,nil,
-- invtypeIndex
0,
-- classIndex, subclassIndex
0,0,
-- page
0,
-- isUsable
0,
-- qualityIndex
0,
-- getAll
false,
-- exactMatch
false
);

and nothing happened, I am not sure what it returns. Now you have pointed out events to me, so maybe I will receive events as returns from the call?

myrroddin 03-29-20 11:28 PM

In most cases code responds to events, therefore they happen first and then you do something when they fire.

For example, AUCTION_HOUSE_SHOW fires and then you can scan for listed posts. You wouldn't, nor couldn't, scan for auctions if the auction house window was not open.

An obvious exception is C_AuctionHouse.CloseAuctionHouse() which then triggers AUCTION_HOUSE_CLOSED, essentially the reverse of the usual activity.

doofus 03-31-20 01:54 AM

Yes, I understand, having also turned trace on and/or printed out events as they arrive. For example when I search for something it does this:


event:[AUCTION_HOUSE_THROTTLED_MESSAGE_SENT] - arg1:[nil] - arg2:[nil] - arg3:[nil] - arg4:[nil] - arg5:[nil] - arg6:[nil] - arg7:[nil]

event:[AUCTION_HOUSE_NEW_RESULTS_RECEIVED] - arg1:[table: 0000024510C18450] - arg2:[nil] - arg3:[nil] - arg4:[nil] - arg5:[nil] - arg6:[nil] - arg7:[nil]

event:[AUCTION_HOUSE_THROTTLED_SYSTEM_READY] - arg1:[nil] - arg2:[nil] - arg3:[nil] - arg4:[nil] - arg5:[nil] - arg6:[nil] - arg7:[nil]

event:[AUCTION_HOUSE_THROTTLED_SPECIFIC_SEARCH_READY] - arg1:[nil] - arg2:[nil] - arg3:[nil] - arg4:[nil] - arg5:[nil] - arg6:[nil] - arg7:[nil]


I cannot see what message was sent to the server, what parameters, and I cannot see what message was received, and what parameters. All except that table which I will investigate now.

An example would be great.

doofus 03-31-20 06:20 AM

OK I have almost sorted it now. I can get a list of items, quantities, and prices.

Thanks


All times are GMT -6. The time now is 04:11 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI