Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Webhook Support for Highscores #730

Open
mikedmor opened this issue Jan 31, 2025 · 4 comments
Open

[Feature Request] Webhook Support for Highscores #730

mikedmor opened this issue Jan 31, 2025 · 4 comments
Assignees
Labels
minor-fixed This issue is fixed and will be shipped with the next minor version.

Comments

@mikedmor
Copy link

Is your feature request related to a problem? Please describe.
VPin is currently limited to communicating high scores to only a select few places (iscored.info). Adding a webhook system that could communicate to alternative systems could massively improve support for alternative systems to integrate with VPin Studio.

Describe the solution you'd like
A webhook system that can send data to a specified endpoint, this should not be required to be an https request (in the event of self hosted software without SSL setup) and should have the following features:

  1. (Important) Table Link - There should be some way to tell VPin Studio which game_id corresponds to a setup pinball table (this is needed when scores are submitted for a specific table so they can be added to the correct game. My software would allow for more than 1 scoreboard, and a game may appear in more than 1 scoreboard. We should have the ability to also store a room_id to ensure scores apply to the correct board, however i will have a setting that will copy a score to all scoreboards once received meaning no room_id would need to be provided.
  2. (Important) Score Webhook - This should transmit the stored game_id, player_initials [and/or player_name], and a score.
  3. (Optional) Tournament Webhook - Similar to the score webhook, but with some additional information needed for tournaments. I don't have many specifics on this one as i have not developed my system yet. This may be able to be worked into the Score Webhook when a specific table has an ongoing tournament.
  4. (Optional) Table Webhook - This should transmit anytime a table in vpin is added, removed, or updated. This would allow automatic importing of new tables to the scoreboard without the user needing to configure anything else

Describe alternatives you've considered
I am the developer of a self-hosted scoreboard solution and right now it does some magic by adjusting the HOST file and registering SSL certificates to trigger via the iscored api integration.

https://github.com/mikedmor/ArcadeScore

The code for this is currently unposted, but once i wrap up a few additional features it will be posted. Feel free to reach out to me if you have any questions regarding how this currently works and i can provide you with the source.

Additional context
N/A

@mikedmor mikedmor changed the title Webhook Support for Highscores [Feature Request] Webhook Support for Highscores Jan 31, 2025
@syd711
Copy link
Owner

syd711 commented Feb 2, 2025

Sounds good. I can't foretell when I'll get started here. I hope you still have some tasks on your side ;)

@mikedmor
Copy link
Author

mikedmor commented Feb 2, 2025

No worries! There is no rush on my end. As i mentioned previously, i currently have this all working by mimicking the iscored.info api endpoints. So worst case I end up releasing my first version utilizing that api with the intention of migrating to the new webhooks once they are ready.

Thanks again!

@syd711
Copy link
Owner

syd711 commented Feb 3, 2025

Regarding your points:

1.) I'm not sure if this is required. Why not simply do it the same way I do it with iScored and map tables via their VP-Spreadsheet id? So this call is not required since...

2.) ...the highscore call can simply pass all data. So everytimea new highscore is created, the VPS table id is passed together with the score data (initials, name, score). I'll provide an input field where the user can enter the URL used for a post request where this data is posted too. The benefit here is that you don't need to setup anything in Studio for this. Once the table has an VPS mapping, the score update call will be made and it is left to your system, to update something or not.

3.) We leave this for later.

4.) Not a problem. I already have this event available and post e.g. updated to Discord when a new table is installed. I would use the same mechanism as for the highscore and pass the vp-spreadsheet id here.

@mikedmor
Copy link
Author

mikedmor commented Feb 3, 2025

Hey Syd711 here is some further clarification:

1.) I added the VP-Speadsheet id to get this working, but if possible would prefer to avoid it. My thought here is that if i install a table that is not listed on VP-Speadsheet then i could still create a link. I discussed with leprinco a bit however and was going to investigate storing the gameID from vpin studio instead to utilize that as a reference, eliminating the need for a listed table in VP-Spreadsheet
2.) This would be perfect, only thing ill add here would be to include the gameID that VPin Studio utilizes for the table so they can be updated from that
3.) agreed
4.) this may not even be needed. while discussing with leprinco, he showed me that vpin has a public API that i could utilize for this:
http://localhost:8089/api/v1/games

@syd711 syd711 self-assigned this Feb 13, 2025
@syd711 syd711 added the minor-fixed This issue is fixed and will be shipped with the next minor version. label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor-fixed This issue is fixed and will be shipped with the next minor version.
Projects
None yet
Development

No branches or pull requests

2 participants