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
Giving this a bump bc it wasn’t answered
@bcartwri96 I think the long and the short of it is that there is very little in the way of comprehensive documentation for Discourse’s Plugin API.
There are bits and pieces of information here on Meta, such as Beginner's Guide to Creating Discourse Plugins - Part 1 but there is no comprehensive API reference it would seem. Although some of what is happening is plain Ember or Rails, there is a huge amount in between which is pure Discourse convention.
Over time it would be good if the community could perhaps work on a Discourse Developer Manual that would fill this gap. We’ve put some of that into practice in terms of fragments of HOWTOs at Dev - Pavilion and hopefully some of that work is the initial groundwork for developing a more comprehensive reference guide.
Checkout this file. Most of the methods are documented briefly
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js
This file has moved to blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs