Created
November 2, 2015 11:54
-
-
Save masato/0d03e1cfb66c5061b42a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"formatVersion":"1.0","tagData":{"name":"myThings","icon":"./res/x2/default_icon.png","description":"入力を受けてIDCFチャンネルのトリガーを発火します。","functions":[{"id":"function_0","name":"Trigger","connector":{"inputs":[{"label":""}],"outputs":[{"label":""}]},"properties":[{"name":"uuid","referenceName":"myTriggerUuid","type":"string","defaultValue":"60bd1824-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},{"name":"token","referenceName":"myTriggerToken","type":"string","defaultValue":"1d6f9xxx"},{"name":"endpoint","referenceName":"myEndpoint","type":"string","defaultValue":"210.140.xxx.xxx"}],"extension":{"initialize":"","receive":"","execute":"var endPointURL = 'http://'+properties.myEndpoint + '/data/'+properties.myTriggerUuid;\n\n\najax ({\n url : endPointURL,\n type : 'post',\n data : 'from MESH',\n timeout : 5000,\n\theaders: {\n\t\t'meshblu_auth_uuid': properties.myTriggerUuid,\n\t\t'meshblu_auth_token': properties.myTriggerToken\n\t},\n success : function ( contents ) {\n\t\tlog('success');\n callbackSuccess( {\n resultType : \"continue\"\n } );\n },\n error : function ( request, errorMessage ) {\n log(\"myThings : Network error\");\n\t\tlog(errorMessage);\n callbackSuccess( {\n resultType : \"continue\"\n } );\n }\n});\n \nreturn {\n resultType : \"pause\"\n};","result":" return {\n resultType : \"continue\"\n}\n"}},{"id":"function_1","name":"New Function","connector":{"inputs":[],"outputs":[]},"properties":[],"extension":{"initialize":"","receive":"","execute":"","result":""}}]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment