-
-
Notifications
You must be signed in to change notification settings - Fork 25
Description
One frustrating problem is that when you save a search (e.g., https://www.pathofexile.com/trade2/search/poe2/Standard/g4jZvGdIQ) it can become invalid over time.
This can be avoided if you save the query object that gets posted to /api/trade2/search/poe2/{league}.
For example, a request to https://www.pathofexile.com/trade2/search/poe2/Fate%20of%20the%20Vaal/4nLPDeZH9 will result in an XHR POST to https://www.pathofexile.com/api/trade2/search/poe2/Fate%20of%20the%20Vaal with the payload:
{"query":{"status":{"option":"available"},"stats":[{"type":"and","filters":[{"id":"explicit.stat_1604736568","disabled":false,"value":{"min":2}}],"disabled":false}],"filters":{"type_filters":{"filters":{"category":{"option":"jewel"}},"disabled":false},"trade_filters":{"filters":{"price":{"min":null,"max":4,"option":null}},"disabled":false}}},"sort":{"price":"asc"}}
If this payload was preserved by better-trading then it could be passed as q in the query string to /trade2/search/poe2/{league} such that the request won't become invalid:
https://www.pathofexile.com/trade2/search/poe2/Fate%20of%20the%20Vaal?q={"query":{"status":{"option":"available"},"stats":[{"type":"and","filters":[{"id":"explicit.stat_1604736568","disabled":false,"value":{"min":2}}],"disabled":false}],"filters":{"type_filters":{"filters":{"category":{"option":"jewel"}},"disabled":false},"trade_filters":{"filters":{"price":{"min":null,"max":4,"option":null}},"disabled":false}}},"sort":{"price":"asc"}}