The UI on GadgetKeeper allows for three basic operations on methods:
A REST API tool, such as API Explorer provides additional operations for methods, such as get/set method details, etc. See for more information.
A new method for a "thing" can be created by clicking "New" in the "Methods" section of the thing. A dialog box opens with the following settings
|Request Data Type||Method request data type (input argument to script function)|
|Response Data Type||Method response data type (return argument from script function)|
|Private||If set, then method can be only called from methods/function/triggers of the same thing.|
After a method has been created, it can be edited anytime by:
Code Method Script
All script methods must have a script function provided for it, as explained in Method Script.
The name of the function must be the same as the method's name
Methods can be called to perform any of the possible interactions on GadgetKeeper, plus they can interact with external services, such as Twitter. There are many ways to call or execute a method, as explained in Create and Execute Method. They can be called by , , , or . The "Call method" dialog box on the UI is explained here. To open the dialog box for "Call Method":
If an input (Request) argument is required for the method's script function, it must be entered in the text area with the same "Request Data Type" that was defined in the Create/Edit Method dialog box
If an output (Response) argument is returned from the method's script function, it will show up in the "Result" text area after "Call" is clicked to execute the script function. The returned value will have the same "Response Data Type" that was defined in the Create/Edit Method dialog box
This example shows how "Hello World" can be given an the input (Request) argument for the updateStatus(string) function. When this function is called, it sends the string to an external service API, so no output "Response" will be returned for display in the "Result" text area