BIG-Games-LLC / ps99-public-api-docs

42 stars 4 forks source link

Add a Websocket Mode #34

Open joekiller opened 2 months ago

joekiller commented 2 months ago

Is your feature request related to a problem? Please describe. As a user of the API data can get out of date. As a host of the API people can do all sorts of things to work around restrictions to try to get the latest data. Because near-real-time updates are important, people will go out of their way to get around rate limits, eventually just hammering the API.

Describe the solution you'd like Allow sites to connect via web socket to receive change data captures. This would reduce the need for polling, people hammering the site from many ips, allow sites to keep data synchronized, and typically reduces the burden on both sides as the APIs grow in popularity. Sending a record of change, before and after snapshots is typically considered the best practice for such an operation.

Describe alternatives you've considered You just gotta pull the site.

Additional context Thanks for making the API, it's great!

5XS commented 1 month ago

In addition, when authorization appears, you can add a webhook to monitor what the player received (award for an achievement, pets, performing some action, items, etc.) If you don’t want to strain your servers, you can sort the submissions by rare items or pets, not all at once (or send to developers who will buy (receive) an additional improvement that reduces the rate limits)