if anyone has any api questions i gocha
theres also github.com/wulliy/wasteof2-docs
If I create a bot using the websocket, how would it be best to run it? From a spare device, replit or some other service, etc.? Thank you!
spare device (if you want to handle managing it) > paid service (for uptime) > replit (if you have pro, then maybe, but the replit ip might get banned so be weary)
what do you mean the replit ip?
people sometimes use replit to run bots that spam the site and stuff, so jeffalo might ip block replit, making it unable to send requests to wasteof
How do I pull something out of the api, say a name or something
well currently everything is name based so there’s not really any reason to get a users name from the api.
the short answer is GET api.wasteof.money/users/NAME
however if you don’t know how rest apis work this could get confusing, so do you need to know that, or did you just need the endpoint?
Mostly how apis work, but if that’s annoying for you, this works
wasteof has a json REST api, which means you got a site (for wasteof that would be api.wasteof.money) and that site returns json (which is a way to show data) to request the api you can use the fetchAPI which is a thing built into browsers and nodejs that lets you send requests easily. using fetch we can send a GET request (GET is the one thats used to get data, POST is for sending data) to get the info. documentation for the endpoints is linked in the post. not sure if this helps
How do you mark a message as read (what’s the request schema)? Thanks!
POST /messages/mark/read
i think the body is like
{ message: "MESSAGE_ID" }
but i cant verify
you get MESSAGE_ID by GET /messages/unread
I think there may be a way to mark multiple messages as read, but i forget and dont have the code i normally reference on hand
Thank you! Someone should write a documentation that includes the request bodies.
maybe ill pr them
oh, update, the body is
{
messages: ["MESSAGEID1", "MESSAGEID2"]
}