module-development
textPage 8 of 43
50 messages on this page
Thursday, July 17, 2025
User 5c75f2
is there a module already made that does what csmms custom notification feature for discord?
Wednesday, July 16, 2025
User a12f6e
heh ok ty
User a12f6e
pog search by gamesererid?
User a12f6e
Ok, what's the preferred way to get players on a specific game server now?
User bddf69
That does a direct call to your gameserver -> very slow and no way to do any filtering or sorting or whatever
User bddf69
Oh yeah that doesn't look right :O But you actually don't want to use that API route, it should be deprecated
User a12f6e
Hahaha well thank you for pointing it out ๐
User bddf69
It's actually been available for months but never documented, just a shadowy unsupported feature ๐ฅท
User bddf69
If you run into stuff you want to extend but isn't available yet, let me know! I can add to this system :)
User a12f6e
I'm stoked this is available now, it's incredible how often I need both player and pog hahaha
User a12f6e
pogs for days!
User a12f6e
Ok then ๐
User bddf69
Nothing nested possible there ;)
User a12f6e
Oh ya I probably should have specified I'm talking about /players/search ๐
User bddf69
Because you start from ShopOrders, which has a relation to listing, which relates to items (many-to-many table) and finally to items iteself
User bddf69
listing.items.item will still return an object
User bddf69
Yep! I screenshotted the real-life example from that docs page
User bddf69
Ah, nice of you to worry about that but no need. The bandwidth is in-cluster local network so it doesn't really matter much :p It's heckin fast
User a12f6e
Errr I don't know what you mean by that. The web API docs you linked earlier show using hierarchal extensions. I think you call them "nested" on that docs page.
User a12f6e
Ok all good, nbd just wondering if that's an option for conserving bandwidth since I'll probably end up doing these extensions A LOT now that they're availablel hehe
User bddf69
If it's not listed in here, you probably wont get it working :P

image.png
PNG โข 113.2 KB
User bddf69
The nested stuff is only if it's actually supported by the underlying models
User bddf69
Don't think that'll work, no
User a12f6e
Or it it object properties only?
User a12f6e
How detailed can I be with hierarchel extensions? Can I do like
extend: ['playerOnGameServers.gameServerId'] to get back only gameServerId for pogs?User a12f6e
Yeah I know, that's why I realllllyyy want name on pog hahaha ๐ Buttt now that you can extend player queries, that helps because I can get pog from player.
User bddf69
It's just all abstracted away from you so you don't really notice it unless you pay attention or look under the hood
User bddf69
Oh btw, just to be sure, the module code you write is actually calling the web API under the hood
User bddf69
It's there if people want to use it though :p Takaro itself is for sure the biggest consumer of the API ๐คทโโ๏ธ
User a12f6e
Yeah I mean given that modules are the first class citizen to Takaro, IMO types documentation is more important. You can figure out web API stuff with that, and the type docs are invaluable for writing modules.
User bddf69
Tree made a web page showing stats using Takaro API a while ago but idk if that's still online
User a12f6e
Hahah, by "any" what I actually mean is "pretty much anyone" lol
User bddf69
I know R20 made a Discord bot to automate some of his admin-y tasks (but that's mainly because Takaro doesnt have good enough Discord support yet, couldve been a module otherwise)
User bddf69
many is a big word :P
User a12f6e
I mean directly, rather than via modules
User a12f6e
Yeah I don't expect param definitions in OpenAPI for writing scripts. The TypeDoc source is much much more useful for writing modules.
Are many people actually using the web API?
User bddf69
Lots of stuff ๐คฃ
User bddf69
I use this to generate a openapi spec from the code
And then I use openapi-generator to go from spec -> api client code
Rapidoc makes the interactive api docs page
And, typedoc to make the detailed code-gen docs
User a12f6e
ope I see it on the doc page, TypeDoc
User a12f6e
Well possible is good ๐ Maybe someday!
What's the name of the doc generator?
User bddf69
It's totally possible though because the API docs has a 'description' field next to the properties. Just gotta untangle how to actually pass it from here all the way to the autogenerated docs ๐
User a12f6e
Oh well, it all works without it and the group here being here to support it helps a lot
User bddf69
Yeh :( I haven't found a way to add comments to properties inside a request body
User a12f6e
Ya, the auto gen documentation is super handy. The only thing that would help with that is doc comments to explain things, but understanding comes with experience haha
User bddf69
Good catch haha
User bddf69

image.png
PNG โข 91.1 KB
User bddf69


