Coflnet / hypixel-react

GNU Affero General Public License v3.0
8 stars 17 forks source link

Add export modal #1294

Closed Ekwav closed 1 month ago

Ekwav commented 1 month ago

/api/auctions/tag/{tag}/archive/export was added to request csv exports of auction data.
There should be a new button on the archive page called Export to csv triggering a modal featuring the explanation text:

Export auction history to a csv file that you can import into Excel or other programs Clicking start export will deduct a one time CoflCoin fee of 1500 to unlock the export of the item for you. This helps to keep the the amount of different items low and exports quicker. The file will be sent to a discord webhook [input for webhook] Please check the filters you want to get data for [filters selected] Each export will contain up to 1000 auctions matching your filter. You can choose to Add social information of the auction buyer, a check if the item is in the players inventory and in which inventory (talisman,armor,backpack etc) and wherever or not to only return the last sale of each item.

The POST request body JSON should look like this, EndBefore and EndAfter are also required:

{
  "discordWebhookUrl": "string",
  "filters": {
    [... filter from search]
  },
  "flags": "IncludeSocial, InventoryCheck, UniqueItems"
}

This completes this suggestion https://discord.com/channels/267680588666896385/1260135610530791465

matthias-luger commented 1 month ago

fixed by #1296