Template:JP APIPage

by 3 contributors:
<h2>Constructors</h2>
<p><span class="script">template("JP_Constructor",{<br />
     name:"Constructor-Name",<br />
     type:"Constructor-Type",<br />
     id:"Menu1",<br />
     description:"This is the description of <span style=\"color:red\">the constructor</span>. The description for each parameter can take markup, but printable quotes need to be escaped.",<br />
     params:[<br />
          {name:"Param1",<br />
            type:"Param1Type",<br />
            description:"You can have zero or more parameters associated with the constructor function. The description for each parameter can take markup, but printable quotes need to be escaped."<br />
            }]<br />
     })<br />
</span><br />
<span class="script">template("JP_Example",{<br />
      title:"A Simple Example",<br />
      textBefore:"This is preamble text to the example.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively. ",<br />
      listing:<br />
'for (var i=0;i !=10;i++){<br />
    foo[i] += 1;<br />
    print("For " + i + ", the answer is "+foo[i]+".")<br />
 };',<br />
     textAfter:"This is postfix text.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively."})<br />
</span></p>
<h2>Methods</h2>
<p><span class="script">template("JP_Method",{<br />
     name:"Method-Name",<br />
     type:"Method-Type",<br />
     id:"Menu1",<br />
     description:"This is the description of a <span style=\"color:blue\">method</span>. The description for each parameter can take markup, but printable quotes need to be escaped.",<br />
     params:[<br />
          {name:"Param1",<br />
            type:"Param1Type",<br />
            description:"You can have zero or more parameters associated with the constructor function. The description for each parameter can take markup, but printable quotes need to be escaped.",<br />
            required:true,<br />
            properties:[<br />
                   {name:"Property1",<br />
                   type:"Property1Type",<br />
                   required:false,<br />
                   default:"Property1DefaultValue"<br />
                   },<br />
                   {name:"Property2",<br />
                   type:"Property2Type",<br />
                   required:false,<br />
                   default:"Property2DefaultValue"<br />
                   }<br />
                ]<br />
            }]<br />
     })<br />
</span><br />
<span class="script">template("JP_Example",{<br />
      title:"A Simple Example",<br />
      textBefore:"This is preamble text to the example.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively. ",<br />
      listing:<br />
'for (var i=0;i !=10;i++){<br />
    foo[i] += 1;<br />
    print("For " + i + ", the answer is "+foo[i]+".")<br />
 };',<br />
     textAfter:"This is postfix text.<br/>It can incorporate markup, but single and double quotes must either be escaped as \\\' or \\\" or replaced with &amp;squot; and &amp;quot; respectively."})<br />
</span></p>
Search for pages that use Template:JP APIPage to see example use cases and how many pages use this macro.

Document Tags and Contributors

Tags: 
Contributors to this page: trevorh, kurt_cagle, Aza
Last updated by: trevorh,