You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used this API to query data directly from our MongoDB server for UncivGames Democracy Bot. Even though the bot is really useful and popular with many users in Discord for the utility it provides, the codebase for it remains largely unmaintainable in terms of how it was written. The bot was written in pure JavaScript, implementing the Discord API from scratch from their docs, with no sort of type or doc generation software used at all, making the codebase understandable mostly only to me and largely unmaintainable. It's the reason why I never felt like making the repo public on GitHub either.
However, recently I had some time and decided to rewrite the codebase in TypeScript, which should make the situation much better and would make it possible for me to publish the repo on GitHub also. But of course, there are issues, one of them being the Atlas Data API, which many of the commands rely heavily on, is getting deprecated. This made me feel the necessity of using an UncivServer.xyz private API that I can then use in other services like the bot. Using the Atlas Data API was not a good choice to begin with because:
It makes us rely on MongoDB.
Changing the database would need a rewrite of major parts of the bot.
Communication between the bot and server should not rely on a database product.
Bot should not access the database directly.
So, with all of these things in mind, I decided to write an API, which will be private for now (not publicly accessible), with the primary focus of using it with the bot for the time being.
I will open a new branch and start working there. Thanks, readers, in case we have any.
The text was updated successfully, but these errors were encountered:
Why do we need this now?
The issue started with the deprecation of the MongoDB Atlas Data API:
https://www.mongodb.com/docs/atlas/app-services/data-api/data-api-deprecation/
I used this API to query data directly from our MongoDB server for UncivGames Democracy Bot. Even though the bot is really useful and popular with many users in Discord for the utility it provides, the codebase for it remains largely unmaintainable in terms of how it was written. The bot was written in pure JavaScript, implementing the Discord API from scratch from their docs, with no sort of type or doc generation software used at all, making the codebase understandable mostly only to me and largely unmaintainable. It's the reason why I never felt like making the repo public on GitHub either.
However, recently I had some time and decided to rewrite the codebase in TypeScript, which should make the situation much better and would make it possible for me to publish the repo on GitHub also. But of course, there are issues, one of them being the Atlas Data API, which many of the commands rely heavily on, is getting deprecated. This made me feel the necessity of using an UncivServer.xyz private API that I can then use in other services like the bot. Using the Atlas Data API was not a good choice to begin with because:
So, with all of these things in mind, I decided to write an API, which will be private for now (not publicly accessible), with the primary focus of using it with the bot for the time being.
I will open a new branch and start working there. Thanks, readers, in case we have any.
The text was updated successfully, but these errors were encountered: