module_template.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5. <head>
  6. <title>Reference</title>
  7. <link rel="stylesheet" href="../ldoc.css" type="text/css" />
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <!-- Menu -->
  18. <div id="navigation">
  19. <br/>
  20. <h1>Modpol</h1>
  21. <ul>
  22. <li><a href="../index.html">Index</a></li>
  23. </ul>
  24. <h2>Contents</h2>
  25. <ul>
  26. <li><a href="#Functions">Functions</a></li>
  27. <li><a href="#Tables">Tables</a></li>
  28. <li><a href="#Fields">Fields</a></li>
  29. </ul>
  30. <h2>Modules</h2>
  31. <ul class="nowrap">
  32. <li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
  33. <li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
  34. <li><a href="../modules/change_modules.html">change_modules</a></li>
  35. <li><a href="../modules/change_modules.html">change_modules</a></li>
  36. <li><a href="../modules/consent.html">consent</a></li>
  37. <li><a href="../modules/create_token.html">create_token</a></li>
  38. <li><a href="../modules/defer_consent.html">defer_consent</a></li>
  39. <li><a href="../modules/display_processes.html">display_processes</a></li>
  40. <li><a href="../modules/join_org.html">join_org</a></li>
  41. <li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
  42. <li><a href="../modules/leave_org.html">leave_org</a></li>
  43. <li><a href="../modules/message_org.html">message_org</a></li>
  44. <li><a href="../modules/randomizer.html">randomizer</a></li>
  45. <li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
  46. <li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
  47. <li><a href="../modules/remove_org.html">remove_org</a></li>
  48. <li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
  49. <li><a href="../modules/remove_process.html">remove_process</a></li>
  50. <li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
  51. <li><a href="../modules/send_token.html">send_token</a></li>
  52. <li><strong>module_template</strong></li>
  53. <li><a href="../modules/tokenomics.html">tokenomics</a></li>
  54. <li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
  55. <li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
  56. <li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
  57. <li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
  58. <li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
  59. <li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
  60. </ul>
  61. </div>
  62. <div id="content">
  63. <h1>Module <code>module_template</code></h1>
  64. <p>Template for module writers.</p>
  65. <p>
  66. Short description goes here.</p>
  67. <h2><a href="#Functions">Functions</a></h2>
  68. <table class="function_list">
  69. <tr>
  70. <td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
  71. <td class="summary">(Required): Initiate function
  72. Modules have access to the following instance variables:
  73. <li><code>self.org</code> (the org the module was called in),</li>
  74. <li><code>self.initiator</code> (the user that callced the module),</li>
  75. <li><code>self.id</code> (the process id of the module instance)</li></td>
  76. </tr>
  77. </table>
  78. <h2><a href="#Tables">Tables</a></h2>
  79. <table class="function_list">
  80. <tr>
  81. <td class="name" nowrap><a href="#data">data</a></td>
  82. <td class="summary">(Required) Data for module
  83. Variables that module uses during the course of a process.</td>
  84. </tr>
  85. <tr>
  86. <td class="name" nowrap><a href="#config">config</a></td>
  87. <td class="summary">(Required): Config for module
  88. Defines the input parameters to the module initiate function.</td>
  89. </tr>
  90. </table>
  91. <h2><a href="#Fields">Fields</a></h2>
  92. <table class="function_list">
  93. <tr>
  94. <td class="name" nowrap><a href="#modpol.modules.module_template">modpol.modules.module_template</a></td>
  95. <td class="summary">(Required) Add to module table</td>
  96. </tr>
  97. </table>
  98. <br/>
  99. <br/>
  100. <h2 class="section-header "><a name="Functions"></a>Functions</h2>
  101. <dl class="function">
  102. <dt>
  103. <a name = "initiate"></a>
  104. <strong>initiate (result)</strong>
  105. </dt>
  106. <dd>
  107. (Required): Initiate function
  108. Modules have access to the following instance variables:
  109. <li><code>self.org</code> (the org the module was called in),</li>
  110. <li><code>self.initiator</code> (the user that callced the module),</li>
  111. <li><code>self.id</code> (the process id of the module instance)</li>
  112. <h3>Parameters:</h3>
  113. <ul>
  114. <li><span class="parameter">result</span>
  115. (optional) Callback if this module is embedded in other modules
  116. </li>
  117. </ul>
  118. </dd>
  119. </dl>
  120. <h2 class="section-header "><a name="Tables"></a>Tables</h2>
  121. <dl class="function">
  122. <dt>
  123. <a name = "data"></a>
  124. <strong>data</strong>
  125. </dt>
  126. <dd>
  127. (Required) Data for module
  128. Variables that module uses during the course of a process.
  129. Can be blank
  130. </dd>
  131. <dt>
  132. <a name = "config"></a>
  133. <strong>config</strong>
  134. </dt>
  135. <dd>
  136. (Required): Config for module
  137. Defines the input parameters to the module initiate function.
  138. Can be blank
  139. When calling a module from within another module,
  140. variables not defined in config will be ignored.
  141. Default values set in config can be overridden
  142. <h3>Fields:</h3>
  143. <ul>
  144. <li><span class="parameter">field_1</span>
  145. ex: votes_required, default = 5
  146. </li>
  147. <li><span class="parameter">field_2</span>
  148. ex: voting_type, default = "majority"
  149. </li>
  150. </ul>
  151. </dd>
  152. </dl>
  153. <h2 class="section-header "><a name="Fields"></a>Fields</h2>
  154. <dl class="function">
  155. <dt>
  156. <a name = "modpol.modules.module_template"></a>
  157. <strong>modpol.modules.module_template</strong>
  158. </dt>
  159. <dd>
  160. (Required) Add to module table
  161. </dd>
  162. </dl>
  163. </div> <!-- id="content" -->
  164. </div> <!-- id="main" -->
  165. <div id="about">
  166. <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
  167. <i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
  168. </div> <!-- id="about" -->
  169. </div> <!-- id="container" -->
  170. </body>
  171. </html>