PhlexPlexico / G5API

An express API for CS2 Servers using MatchZy and PugSharp to record and manage matches.
MIT License
96 stars 31 forks source link

[Feature Request] Challonge integration (Tournament application) #175

Closed DigitalFriends closed 2 years ago

DigitalFriends commented 2 years ago

Hi,

A while back i was following an issue here on the possibility for "Toornament" integration. Their API went paid and it turned alot less useful.

Would this be a viable alternative? I have used Challonge for both CSGO, CS1.6 and simracing leauges, it works great and looks good to.

If G5V could be integrated atleast somewhat with a service like this, it could streamline the creation, management and ease of use for the arranger.

According to my findings, unlimited api calls are possible with the free tier.

Challonge: https://challonge.com/sv Api docs: https://api.challonge.com/sv/v1

Old issue i was reffering to: https://github.com/PhlexPlexico/G5V/issues/28

PhlexPlexico commented 2 years ago

Heya!

This was actually requested way back in G5API. https://github.com/PhlexPlexico/G5API/issues/125

While I definitely wouldn't be opposed to it, I have listed some concerns beforehand as well, mainly dealing with teams and authentication. PRs are most definitely welcome for this! I think the general flow would be something like this (if possible from Challonge)

I think the workflow would be something like that, but I haven't looked into the API either, so I'm not sure the specifics, but I think something like that could work.

DigitalFriends commented 2 years ago

Amazing, i'll see if i can be useful here and possibly help out in some way. Let me know if i can do anything for you.

PhlexPlexico commented 2 years ago

Hey @DigitalFriends,

I'm not sure if you're using the Docker images provided, or just the repo itself. But if you're using the repo, would you mind checking out the Challonge branch? Right now you'll have to make POST calls to the API to set it up, as the front end hasn't been updated yet, but you should be able to give a user a Challonge API key (via PUT on the /user route), and create a season/tournament by providing the tournament ID.

I think most functionality is put in there, the only thing a user would have to do is assign the Steam IDs per team, and then the API should take care of the rest, and it should even update the match on Challonge's end once it's complete with the match score. I'm just working on trying to get live updates when the rounds end as well, just to see how robust I can make it. If you're unable to test, just let me know and I'll figure something out before merging this in :)

Thanks!

DigitalFriends commented 2 years ago

Hey @DigitalFriends,

I'm not sure if you're using the Docker images provided, or just the repo itself. But if you're using the repo, would you mind checking out the Challonge branch? Right now you'll have to make POST calls to the API to set it up, as the front end hasn't been updated yet, but you should be able to give a user a Challonge API key (via PUT on the /user route), and create a season/tournament by providing the tournament ID.

I think most functionality is put in there, the only thing a user would have to do is assign the Steam IDs per team, and then the API should take care of the rest, and it should even update the match on Challonge's end once it's complete with the match score. I'm just working on trying to get live updates when the rounds end as well, just to see how robust I can make it. If you're unable to test, just let me know and I'll figure something out before merging this in :)

Thanks!

Hi,

I have updated and everything seems to be working fine. I have some other questions though about the integration, is there anywhere we can chat?

PhlexPlexico commented 2 years ago

I'm available through Discussions, Twitter, or (least preferred) Discord if you'd like. Let me know which you prefer.

Thanks!

DigitalFriends commented 2 years ago

Hi,

I prefer Discord for now if it's possible on your end! Can i add your discord id?

PhlexPlexico commented 2 years ago

Sure thing.