Created
December 6, 2015 10:35
-
-
Save masato/718bad2a074d5e8588e8 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":"xxx"},{"name":"token","referenceName":"myTriggerToken","type":"string","defaultValue":"xxx"},{"name":"endpoint","referenceName":"myEndpoint","type":"string","defaultValue":"xxx"}],"extension":{"initialize":"","receive":"","execute":"var endPointURL = 'http://'+properties.myEndpoint + '/data/'+properties.myTriggerUuid;\n\n\najax ({\n url : endPointURL,\n type : 'post',\n data : 'MESH trigger',\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('trigger success');\n callbackSuccess( {\n resultType : 'continue'\n } );_\n },\n error : function ( request, errorMessage ) {\n log('trigger : Network error');\n\t\tlog('trigger : ' + errorMessage);\n callbackSuccess( {\n resultType : 'continue'\n } );\n }\n});\n \nreturn {\n resultType : 'pause'\n};","result":" \n\nreturn {\n resultType : \"continue\"\n}\n"}}]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment