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 ![]()
أعيد رفع هذا الموضوع لأنه لم يُجب بعد ![]()
@bcartwri96 أعتقد أن جوهر الأمر هو أن هناك القليل جدًا من التوثيق الشامل لواجهة برمجة التطبيقات (API) الخاصة بـ Discourse.
هناك قطع متفرقة من المعلومات هنا في Meta، مثل https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515/1، ولكن يبدو أنه لا يوجد مرجع شامل لواجهة برمجة التطبيقات. وعلى الرغم من أن بعض ما يحدث هو مجرد Ember أو Rails، إلا أن هناك كمية هائلة من التفاصيل في المنتصف تعتمد كليًا على اتفاقيات Discourse.
مع مرور الوقت، سيكون من الجيد لو ساهم المجتمع في إعداد دليل مطوري Discourse لسد هذه الفجوة. لقد طبقنا جزءًا من ذلك في شكل مقاطع من أدلة “كيف تفعل” (HOWTOs) على Pavilion ونأمل أن يكون بعض هذا العمل هو الأساس الأول لتطوير دليل مرجعي أكثر شمولاً.
تحقق من هذا الملف. معظم الأساليب موثقة بإيجاز
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js
تم نقل هذا الملف إلى blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs