Sorry if this has been asked, I tried searching for documentations but all I can find is the Get Started post, it helped me create a plugin but it didn’t cover topics such as what APIs are available. So, are there documents at all?
Thanks!
Sorry if this has been asked, I tried searching for documentations but all I can find is the Get Started post, it helped me create a plugin but it didn’t cover topics such as what APIs are available. So, are there documents at all?
Thanks!
Api documentation is available at
http://docs.discourse.org
Discourse API doc is not what I’m requesting. I was thinking about something like Chrome plugin development docs or WordPress plugin development docs. For example when I read the Beginner’s Guide to Creating Discourse Plugins, I have questions like what are other special properties and callbacks does Discourse recognize in the default module? or what parameters are passed into the initialize() method? Neither the guide nor docs.discourse.org answered those questions.
As discourse uses ember in frontend and rails in backend, you can browse their respective docs to know how to create components, or controllers, etc.
That being said, you can go through the code of discourse to learn how they are doing things.
I had asked similar question long time back… See if the answers given here help you.
Then those questions are probably good candidates for dev ![]()
Sollevo di nuovo l’argomento perché non è stata data risposta ![]()
@bcartwri96 Credo che il punto fondamentale sia che esiste ben poca documentazione completa sull’API dei plugin di Discourse.
Ci sono sparsi vari pezzi di informazione qui su Meta, come ad esempio Developing Discourse Plugins - Part 1 - Create a basic plugin, ma sembra non esserci un riferimento API completo. Anche se alcune delle funzionalità sono puramente Ember o Rails, c’è una vasta area intermedia che segue convenzioni specifiche di Discourse.
Col tempo, sarebbe auspicabile che la comunità potesse collaborare alla stesura di un Manuale per Sviluppatori di Discourse che colmi questa lacuna. Abbiamo già iniziato a mettere in pratica alcuni di questi sforzi con frammenti di HOWTO disponibili su Pavilion, e speriamo che questo lavoro costituisca una base iniziale per sviluppare una guida di riferimento più completa.
Controlla questo file. La maggior parte dei metodi è documentata brevemente
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js
Questo file è stato spostato in blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs