Skip to content

Latest commit

 

History

History
120 lines (93 loc) · 5.28 KB

komodefi_method.mdx

File metadata and controls

120 lines (93 loc) · 5.28 KB

Category Heading

The category heading is optional, an used for pages with multiple related methods. This section should include a brief description of the category, and links to each method section of the page.

Method Heading {{label : 'method_name', tag : 'API-v2'}}

The method_name method has a description about what it is used for and it will be written here. The method heading can be slightly different to the method name if it makes it easier to understand. The anchor URL to be used in the sidebar will be the same as the method heading, with - im plce of a space between words, for example /path/to/file#method-heading. Limitations, if any, will be mentioned. There might also be links to related methods, notes, or more information about the feature this method helps to implement. If there are optional paramaters which need a more detailed explanation, it should go here to avoid cluttering the table below.

Request Parameters

Parameter Type Description
someText string This text string has a purpose and here it is.
numberText string (numeric) This text string has a purpose and here it is.
wholeNumber integer What is the reason for this number?
decimalNumber float What is the reason for this number?
someObject object There should be a link here to a separate table for this object
listOfObjects array of objects There should be a link here to a separate table for an instance of the object within this array
isOrIsNot boolean What does this turn on or off?
optionalParam boolean Optional, defaults to something. What difference does it make?

📌 Example(s)

```json { "userpass": "RPC_UserP@SSW0RD", "method": "METHOD_NAME", "mmrpc": "2.0", "params": { "key": "value", "object_array": [ { "key": "value" }, { "key": "value" } ] } } ```

Response Parameters

Parameter Type Description
someText string This text string has a purpose and here it is.
numberText string (numeric) This text string has a purpose and here it is.
wholeNumber integer What is the reason for this number?
decimalNumber float What is the reason for this number?
someObject object There should be a link here to a separate table for this object
listOfObjects array of objects There should be a link here to a separate table for an instance of the object within this array
isOrIsNot boolean What does this turn on or off?
optionalParam boolean Optional, defaults to something. What difference does it make?

Response

{
  "key": "value",
}

SomethingError

This error happens because. In this case, you need to do something. The name of this error should be the same as the error_type in the response.

{
  "mmrpc": "2.0",
  "error": "SomethingError",
  "error_path": "function_error_thrown_in",
  "error_trace": "trace_to_line_number:333]",
  "error_type": "SomethingError",
  "error_data": "Error data",
  "id": null
}

AnotherError

This error happens because. In this case, you need to do something. The name of this error should be the same as the error_type in the response. This and other errors all sit within the same CollapsibleSection tags.

{
  "mmrpc": "2.0",
  "error": "Some info about the error which might offer insight into what went wrong",
  "error_path": "function_error_thrown_in",
  "error_trace": "trace_to_line_number:333]",
  "error_type": "AnotherError",
  "error_data": "Data about the error",
  "id": null
}
View the source code at: https://github.com/KomodoPlatform/repo/blob/branch/folder/file.ext