ff14-advanced-market-search / saddlebag-with-pockets

This is the Frontend for the FF14 Marketplace

Home Page:https://saddlebagexchange.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WoW Region Wide Undercut check page

cohenaj194 opened this issue · comments

So I want a page similar to the allagan-data page. A user will paste a long json list and then run it into the api:

http://api.saddlebagexchange.com/api/wow/regionundercut

The data is coming from our own addon so if we need to change something I can fix it.

{
    "region": "NA",
    "homeRealmID": 3678,
    "addonData": [
        {
           "homeRealmName": "119",
           "region": "US",
           "user_auctions": [
               {"petID": 3390 ,"price": 19990000, "auctionID": 1230520002},
               {"petID": 846 ,"price": 33009800, "auctionID": 1230519938},
               {"petID": 3331 ,"price": 150000000, "auctionID": 1230520087}
           ]
        },{
            "homeRealmName": "1263",
            "region": "US",
            "user_auctions": [
                {"itemID": 200905, "price": 11110000, "auctionID": 1228450847},
                {"itemID": 200469, "price": 44440100, "auctionID": 1230070427},
                {"itemID": 200907, "price": 11110000, "auctionID": 1228450575},
                {"itemID": 200906, "price": 27500000, "auctionID": 1230080388},
                {"itemID": 194018, "price": 17996900, "auctionID": 1230070682},
                {"itemID": 194018, "price": 16996900, "auctionID": 1230070221},
                {"itemID": 194057, "price": 7770100, "auctionID": 1228451179},
                {"itemID": 194018, "price": 22226900, "auctionID": 1227369374}
            ]
        },{
            "homeRealmName": "1566",
            "region": "US",
            "user_auctions": [
                {"petID": 3390 ,"price": 22210000, "auctionID": 1228482500}
            ]
        }, {
            "homeRealmName": "91",
            "region": "US",
            "user_auctions": [
                {"petID": 2188 ,"price": 447800, "auctionID": 1230103976},
                {"petID": 3038 ,"price": 9000000, "auctionID": 1230103836},
                {"petID": 3287 ,"price": 9450000, "auctionID": 1230105158},
                {"petID": 2190 ,"price": 15808000, "auctionID": 1228649110},
                {"petID": 844 ,"price": 22221300, "auctionID": 1225731957},
                {"petID": 845 ,"price": 33330000, "auctionID": 1225733362},
                {"petID": 3390 ,"price": 44449900, "auctionID": 1230104566},
                {"petID": 846 ,"price": 66669900, "auctionID": 1230105054},
                {"petID": 3541 ,"price": 150000000, "auctionID": 1230103632}
            ]
        }
    ]
}

In the output the important ones are:

  • import_search_json should link to a new search on the wow pet import trade search ref: #267
  • not_found_list is a sortable list of all items that are sold, expired or not found in the api
  • undercut_list is a items that are undercut

The api also returns a dictionary of results_by_realm that we can build a page for later.

  • The results_by_realm shows similar data organized by realm and includes items not undercut with additional data. The other data is more essential as long as users can sort the tables by realm name.
{
    "import_search_json": {
        "ROI": 50,
        "avgPrice": 1000,
        "connectedRealmIDs": {
            "1185": "Bloodscalp",
            "3676": "Area 52",
            "104": "Burning Blade"
        },
        "homeRealmID": 3678,
        "maxPurchasePrice": 2000,
        "profitAmount": 2000,
        "region": "NA",
        "salesPerDay": 20,
        "sortBy": "lowestPrice"
    },
    "not_found_list": [
        {
            "connectedRealmId": 3678,
            "item_id": 194018,
            "item_name": "Azureweave Expedition Pack",
            "link": "https://undermine.exchange/#us-thrall/194018",
            "lowest_price": 1799.69,
            "realmName": "Thrall",
            "user_price": 1699.69
        },
        {
            "connectedRealmId": 3678,
            "item_id": 194057,
            "item_name": "Cushion of Time Travel",
            "link": "https://undermine.exchange/#us-thrall/194057",
            "lowest_price": 1111.01,
            "realmName": "Thrall",
            "user_price": 777.01
        }
    ],
    "undercut_list": [
        {
            "connectedRealmId": 104,
            "item_id": 3038,
            "item_name": "Undying Deathroach",
            "link": "https://undermine.exchange/#us-burning-blade/82800-3038",
            "lowest_price": 900.0,
            "realmName": "Burning Blade",
            "user_price": 900.0
        },
        {
            "connectedRealmId": 104,
            "item_id": 3287,
            "item_name": "Ghostflame",
            "link": "https://undermine.exchange/#us-burning-blade/82800-3287",
            "lowest_price": 945.0,
            "realmName": "Burning Blade",
            "user_price": 945.0
        },
        {
            "connectedRealmId": 104,
            "item_id": 3541,
            "item_name": "Ridged Shalewing",
            "link": "https://undermine.exchange/#us-burning-blade/82800-3541",
            "lowest_price": 15000.0,
            "realmName": "Burning Blade",
            "user_price": 15000.0
        },
        {
            "connectedRealmId": 3678,
            "item_id": 200906,
            "item_name": "Illusion: Primal Fire",
            "link": "https://undermine.exchange/#us-thrall/200906",
            "lowest_price": 2750.0,
            "realmName": "Thrall",
            "user_price": 2750.0
        },
        {
            "connectedRealmId": 3676,
            "item_id": 3390,
            "item_name": "Sophic Amalgamation",
            "link": "https://undermine.exchange/#us-area-52/82800-3390",
            "lowest_price": 2219.0,
            "realmName": "Area 52",
            "user_price": 2221.0
        },
        {
            "connectedRealmId": 3678,
            "item_id": 200905,
            "item_name": "Illusion: Primal Earth",
            "link": "https://undermine.exchange/#us-thrall/200905",
            "lowest_price": 1111.0,
            "realmName": "Thrall",
            "user_price": 1111.0
        },
        {
            "connectedRealmId": 3678,
            "item_id": 200907,
            "item_name": "Illusion: Primal Frost",
            "link": "https://undermine.exchange/#us-thrall/200907",
            "lowest_price": 1111.0,
            "realmName": "Thrall",
            "user_price": 1111.0
        }
    ]
}

Just to clarify, which part comes from the tool, is it just the addonData array?

Also getting the error '633' returned, any idea what that means?

Just to clarify, which part comes from the tool, is it just the addonData array?

Yep just the addonData. The rest should come from the settings in our frontend.

Also getting the error '633' returned, any idea what that means?

Ill retry in a bit, it could be due to the old data in example. I will investigate.

@oldben87 heres the latest data i have to test with:
message.txt