WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Looking for the correct functions to get item ids and prices of my auctions (https://www.wowinterface.com/forums/showthread.php?t=59374)

indopan 11-26-22 10:27 PM

Looking for the correct functions to get item ids and prices of my auctions
 
I'm making an api that interacts with the Blizzard API. My API takes a specific json input where I need to list the item ids and prices of the items im selling on the auction house (in copper to match the blizz market api data). Heres an example of the json I need.

Code:

{
    "homeRealmId": 3678,
    "region": "NA",
    "user_auctions": [
        {
            "itemID": 4500,
            "price": 97400
        },
        {
            "itemID": 173242,
            "price": 900000
        },
        {
            "itemID": 189145,
            "price": 22003000
        }
    ]
}

My end goal is to make an addon that can generate this with a button click and copy that text to the users clipboard or at least show the data in a message() pop up.

Where would I start? I am thinking GetAuctionItemInfo() or GetNumAuctionItems() seem to be the first functions to look into, I just need to learn how to do them or find good examples I can try without lua errors https://wowwiki-archive.fandom.com/w...PI#Auction****


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

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI