Tuesday Topics #37: API v5 Rollout

Published by Loren

Learn about the new Donut Team API that rolled out recently and what this means for future developments of our web services.

162 views

Introduction

Hey everyone, this is Loren from Donut Team and welcome to another Tuesday Topics blog post!

This past week, we quietly rolled out a new major version of the Donut Team API. Today, I'd like to briefly discuss what this means for the future of our web services.

A Quick History Lesson

Since last August, I've iterated a lot on our API. Here's a quick rundown of all of the versions that have existed so far:

  • V1: This was our legacy PHP-based API that powers things such as Donut Team Account Integration in the Mod Launcher.
    • All endpoints from this version are still supported and will remain supported indefinitely.
    • This version is also currently the only one available for public use which you can read about here if you'd like.
  • V2: This version was in development prior to August but was scrapped soon afterwards.
  • V3: This is the first version I created and this is when our API shifted to being powered by Node.js. It was a decent starting point but development of it didn't scale very well so I scrapped it and tried again.
  • V4: This was a rewrite of V3 aimed at making it easier to interact with the database. I definitely made some strides here but I still didn't care for it very much.
  • V5: As of last night, this is now the current version.
    • As discussed in the previous blog post, this version heavily leverages the powers of Sequelize to make interacting with our database and joining related data together an absolute breeze.

What does this mean?

You might be wondering what this means for the future of Donut Team's web services.

I believe it means much more rapid development, development that gets less hung up on the best way to store and retrieve user data and focuses more on actually building out services and features for the community.

The first thing I'm working on with this new API, besides updating existing services such as the Forum and Safety Tunnel to utilize it, is making a new version of this website that is more dynamic.

Currently, this website hardcodedly loads data for all of the releases and blog posts featured on it at startup, as well as user data for the team page. I knew at the time I designed it (rather quickly) that this was not a future proof approach since it makes it difficult or impossible to build out websites that allow this data to be created by us or by users dynamically.

Conversely, the new version I'm working on, and expect to have launched within the next couple of weeks at the latest, retrieves all releases, blog posts, and user information from our database. In fact, the data is already there (with the exception of this post, for now) and I just need to finish building out a new homepage application that interfaces with the new API.

That means all release information is, once again, stored within our database (like how it was back in the days of sharmods.donutteam.com) but in a much more future-proof way this time. These new tables support multiple release authors, links versions and more. Furthermore, I designed the new table structure with Mod Bakery in mind so all of the releases currently on our site will smoothly transition to being Mod Bakery releases when that service launches in the future.

Needless to say, I am excited. I believe I've finally found an API structure that lends itself incredibly well to building out services we've had in our sights for a long time (such as Mod Bakery!) and I can't wait to take you all on this adventure with us.

Conclusion

Thanks for reading another one of our Tuesday Topics posts! See you again next week.

- Loren from Donut Team

P.S.: Borb thinks you should listen to this.