Hey Everyone!
I've just finished a pretty major project that I have had in the works for about 9 months now, all stemming from the difficulty I had trying to use RGL's API, which to be honest isn't the best (sorry guys v_v). Not that any of their team is really to blame either. From what I understand, with the way they began structuring their data, it doesn't make it easy to query with their current API. One example use case this impedes currently is getting the latest map pool for each format.
So what I did was just get all of the season data I could and add it to our own DB, just keeping the data that we care about, making sure to format it such that using our dataset would supplement any shortcomings of theirs. I'm using Dolthub for our database since it makes collaboration super easy, and the api is already fully featured. You can find our org here.
I wanted to make it easy for the community to update and contribute to our dataset, so I also made a simple discord bot and a custom automation workflow to accomplish this. I've named this bot Autobot, and you can find the repo for it here.
What we have right now
Try it out by typing: `/update table:TF2 RGL Seasons id:159`
Autobot will tell you if this season is already in our database or create a PR to add it. In the background Autobot will:
1. Check if the season already exists in our database
2. If not, pull the data from RGL.gg
3. Create a branch and PR with the new data
4. Let you know the result
- **Easier Contributions**: No need to manually create PRs or write SQL
- **Faster Updates**: Get new data added in seconds rather than minutes
- **Cleaner Data**: Consistent formatting for all database entries
- **Community Involvement**: Everyone can help keep our database up to date
Behind the Scenes
This integration connects our Discord server to our backend automation systems and a DoltHub database, automating what was previously a manual process.
See this diagram of how the process works below.
What's Next?
While we're starting with the TF2 RGL Seasons table, we'll be adding support for more tables in the future. This is just the beginning of making our database more accessible to community contributions!
One thing I do plan use this for at some point is our own events/tournaments. Right now our only way to track participants/winners/losers would be in discord, and long term that wont be sustainable. This project would be a perfect solution to that problem.
Other than that, I don't know exactly what we will be using it for, so as of now its just for stuff that makes our lives easier.
Contributing!
I am opening Autobot to everyone in our discord server. Help us keep our data up to date by adding any missing information you notice.
Please direct any questions or suggestions to the #development channel in our discord, as I'm sure that I'm not fully explaining what this creates groundwork for also.