Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
functions:creating_a_custom_function [2025/01/21 01:47]
optrix
functions:creating_a_custom_function [2025/01/21 05:36] (current)
optrix
Line 19: Line 19:
 ^File Name^Purpose^ ^File Name^Purpose^
 |desc.html|HTML content to describe the function, provide examples etc.| |desc.html|HTML content to describe the function, provide examples etc.|
-|pre_<format>.php|Scripts that are run //before// the function is executed to set up execution when the user has requested a particular output format.| +|script files|Python, batch or [[Formatting Scripts|formatting scripts]]|
-|<format>.php|Scripts that are run //after// the function is executed, usually to format or translate the output data into other functions.|+
  
 ===Info File Contents=== ===Info File Contents===
Line 29: Line 28:
 |name|The friendly name for the API function| |name|The friendly name for the API function|
 |desc|A plain text description of the function| |desc|A plain text description of the function|
-|method|The [[style]] of API point|+|method|The [[style|method]] used to return API data|
 |folder|The organisational folder to place the API function into| |folder|The organisational folder to place the API function into|
 |parameters|The parameters to the function| |parameters|The parameters to the function|
Line 37: Line 36:
 { {
  "name": "Output Temperature",  "name": "Output Temperature",
- "method": "pythonmodel", + "method": "python",
  "desc": "Returns the expected output temperature given the input temperature",  "desc": "Returns the expected output temperature given the input temperature",
  "parameters": [ {  "parameters": [ {
Line 51: Line 50:
 </code> </code>
  
-This example describes a function called 'Output Temperature' - using the [[PythonModel|Python Model]] method - that includes a single parameter.+This example describes a function called 'Output Temperature' - using the [[Python|Python]] method - that includes a single parameter.
  
 [[Parameter|Parameter options]] are described later - they are used to not only describe the parameters, but to power the user interface to help test/demonstrate them. [[Parameter|Parameter options]] are described later - they are used to not only describe the parameters, but to power the user interface to help test/demonstrate them.