POST Endpoint
Closed this issue · 0 comments
alvinl commented
Allow the user to add a POST endpoint in the config, the bot can then send post data to that endpoint on every event or contained to just trade events (ie whnever a trade finishes, post the items recieved and from whom). This could also work vice versa where you can send a post command to the bot. This feature would be useful for integrating with a forum or a website.
Example config parameter:
{
"API": {
"endpoint": "http://website.com.com/botapi.php"
}
}
endpoint
can also be an array to allow for multiple POST calls
Example POST data (trade end):
{
"event": "tradeEnded",
"tradeStatus": "1",
"traded": "133526574",
"itemsReceived": ["array of items received in trade"],
"time": "timestamp",
"tradeLength": "amount of time the trade took"
}
event
can be the type of event to sendtradeEnded
a trade has endedmessage
a new message- etc.
tradeStatus
the status of the trade ending1
trade ended successfully with items traded2
trade timeout- etc.
traded
the steamID of the user the bot was tradingitemsReceived
an array of items received, can be emptytime
when the trade was initiatedtradeLength
how long the trade lasted, this could be replace with a timeEnd timestamp
Any suggestions are welcome, weather or not this will be added for the v1.0 release is still being decided