Template:REST Operations

From ToxBank API Wiki
(Difference between revisions)
Jump to: navigation, search
 
(30 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
<pre>
 
<pre>
 
{{REST_Operations
 
{{REST_Operations
|component=
+
|REST_op_description=
|description=
+
|REST_op_method=
|method=
+
|REST_resource=
|uri=
+
|REST_op_uri=
|parameters=
+
|REST_op_params=
|result=
+
|REST_header_param=subjectid:SECURITY-TOKEN
|status_code=
+
|REST_op_result=
 +
|REST_op_status=
 +
|REST_op_mime_input=
 +
|REST_op_mime_output=
 +
|REST_op_example=
 
}}
 
}}
 
</pre>
 
</pre>
Line 17: Line 21:
 
{| class="wikitable"
 
{| class="wikitable"
 
! Description
 
! Description
| {{{description|}}}
+
| {{{REST_op_description|}}}
 +
|-
 +
! Resource
 +
| [[{{{REST_resource|}}}]]
 
|-
 
|-
 
! Method
 
! Method
| {{{method|}}}
+
| [[{{{REST_op_method|}}}]]
 
|-
 
|-
 
! URI
 
! URI
| {{{uri|}}}
+
| {{{REST_op_uri|}}}
 
|-
 
|-
 
! Parameters
 
! Parameters
| {{{parameters|}}}
+
| {{{REST_op_params|}}}
 +
|-
 +
! Header Parameters
 +
| {{{REST_header_param|}}}
 +
|-
 +
! Media Type (input)
 +
| {{{REST_op_mime_input|}}}
 
|-
 
|-
 
! Results
 
! Results
| {{{result|}}}
+
| {{{REST_op_result|}}}
 +
|-
 +
! Media Type (output)
 +
| {{{REST_op_mime_output|}}}
 
|-
 
|-
 
! Status code
 
! Status code
| {{{status_code|}}}
+
| {{{REST_op_status|}}}
 
|}
 
|}
 +
 +
{{#ifeq: {{PAGENAME}} | {{{REST_resource|}}} | |
 +
  {{#if:{{{REST_op_status|}}} |
 +
    {{#set: |Has status code={{{REST_op_status|}}} }}
 +
  | }}
 +
  {{#set: |Has output media type={{{REST_op_mime_output|}}} }}
 +
  {{#set: |Acts on={{{REST_resource|}}} }}
 +
}}
  
 
[[Category:REST_API]]
 
[[Category:REST_API]]
 +
[[Category:REST_Operations]]
 +
{{#if:{{{REST_op_method|}}} |
 +
[[Category:{{{REST_op_method|}}}_Operations]]
 +
}}
 
</includeonly>
 
</includeonly>

Latest revision as of 12:35, 7 October 2011

This is the "REST_Operations" template. It should be called in the following format:

{{REST_Operations
|REST_op_description=
|REST_op_method=
|REST_resource=
|REST_op_uri=
|REST_op_params=
|REST_header_param=subjectid:SECURITY-TOKEN
|REST_op_result=
|REST_op_status=
|REST_op_mime_input=
|REST_op_mime_output=
|REST_op_example=
}}

Edit the page to see the template text.

Personal tools