2021-08-26 16:24:14 +02:00
[
{
2022-02-18 13:13:10 +01:00
"id" : "df207830040c7255" ,
2021-08-26 16:24:14 +02:00
"type" : "tab" ,
"label" : "Settings" ,
"disabled" : false ,
2022-02-18 13:13:10 +01:00
"info" : "" ,
"env" : [ ]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"type" : "tab" ,
"label" : "Response" ,
"disabled" : false ,
2022-02-18 13:13:10 +01:00
"info" : "" ,
"env" : [ ]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"type" : "group" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
2021-08-26 16:24:14 +02:00
"name" : "Subscriptions " ,
"style" : {
"stroke" : "#000000" ,
"fill" : "#addb7b" ,
"label" : true ,
"color" : "#000000" ,
"fill-opacity" : "0.46"
} ,
"nodes" : [
2022-02-18 13:13:10 +01:00
"26d8d7df.be0958" ,
"98d5cd6c.f2a68" ,
"f2b8d96b.d631b8" ,
"f70bfcf8.11e1" ,
"7dbcec20.5ced04" ,
"5bff93af.87898c" ,
"690eda34.2888d4" ,
"d3a93046ef612be8" ,
"7e0de8ca88627f13" ,
"ec98aacb0f957338" ,
"30982b64daa64b4f" ,
"fd85f36550d37557" ,
"ce3d135404921045" ,
"3c4839ef38d1e5be" ,
"49ebc9ee3ff5553f" ,
"6aa36f6125c38ddf" ,
"84e31e98de53c8f6" ,
"566b14e2f0568603" ,
"a383193c03077b55" ,
"f9c17dfc34ee6ddc" ,
"c7fe8d294efda317" ,
"82b0797b3012e829" ,
"30fbfd9411298b86" ,
"ee66b6128ff85327" ,
"8b713e9019cc4516" ,
"ffae0df38c6c8c22" ,
"2c9e19de6c1f6cd4" ,
"5e33e16d982b9232" ,
"dd4a8a1e4291d855" ,
"bcb057363ba3c378" ,
"d2fd9327385f9448" ,
"8a66fd4794b48b1b" ,
"697267a917a5ede1" ,
"e3011972045e8564" ,
"1053bfdaa6f39afb" ,
"6a40e123a2c65178" ,
"c6a0489a3ee00082"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 24 ,
"y" : 499 ,
"w" : 1532 ,
"h" : 452
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"type" : "group" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"name" : "API Settings" ,
2021-08-26 16:24:14 +02:00
"style" : {
"stroke" : "#000000" ,
2022-02-18 13:13:10 +01:00
"fill" : "#ff3f3f" ,
"fill-opacity" : "0.42" ,
2021-08-26 16:24:14 +02:00
"label" : true ,
2022-02-18 13:13:10 +01:00
"color" : "#000000"
2021-08-26 16:24:14 +02:00
} ,
"nodes" : [
2022-02-18 13:13:10 +01:00
"beab0c19.6d93b" ,
"966a372a.a07628" ,
"a9ab8eef.baa2" ,
"566f2428.09694c" ,
"b8602e99.36c57" ,
"fd63f4262302c5b3" ,
"7ac706a80063eebd" ,
"c93450a865e58d44" ,
"252b179b82c058d7" ,
"293eff994c230d75" ,
"e0b907cdd8ccc1cf" ,
"3b0aad40327d2546" ,
"1112a9e81345ea8b" ,
"9a8612014ad4c799" ,
"379327a91b22c7dd" ,
"e44ac409f8d18e83" ,
"8b2294e6bc52446d" ,
"3f7a96c6437a13b9" ,
"a0c81e642c7a3105" ,
"ad6618efadfffb7c" ,
"d063ce8e1987378e" ,
"2c88d43747076c97" ,
"e35fd443178b1637" ,
"d7b248978206a06f" ,
"b1096a477fb9abe5" ,
"055dadece0fd3af6" ,
"aea1f7b492402c01" ,
"4d6e5b640e32530c" ,
"2b8377a30ae7e578" ,
"2c4a0a29dd209504" ,
"18a0ecdb51dce96a" ,
"a70f82e316ae9b20" ,
"eff64b41360d736d" ,
"ecd9237822214175" ,
"e6f5f8a94cc12207" ,
"4c3ce8432cc7554a" ,
"527713e229815eae" ,
"645e4c286635a52f" ,
"b9d57c51dcfa392e"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 24 ,
"y" : 29 ,
"w" : 872 ,
"h" : 462
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "da23423c6c5ba9f9" ,
2021-08-26 16:24:14 +02:00
"type" : "group" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"name" : "Webhook" ,
2021-08-26 16:24:14 +02:00
"style" : {
"stroke" : "#000000" ,
2022-02-18 13:13:10 +01:00
"fill" : "#7fb7df" ,
2021-08-26 16:24:14 +02:00
"label" : true ,
2022-02-18 13:13:10 +01:00
"color" : "#000000" ,
"fill-opacity" : "0.5"
2021-08-26 16:24:14 +02:00
} ,
"nodes" : [
2022-02-18 13:13:10 +01:00
"172852334e067eab" ,
"a14899d1bdaee6ae" ,
"e9b516c0427c7331" ,
"9bae08932a4b918f" ,
"b99ebb122e5c2d93" ,
"e2b1a1d555abedaa" ,
"496beddfeba0baee" ,
"09b3f14a7ec50bce" ,
"8c2a43d196ec7e5c" ,
"83822eaec1eca52b" ,
"9ae2fc3a337f9a0e" ,
"70fdfa29ec214ea2" ,
"189539cfa8fd4634" ,
"0953d456cfdb4563" ,
"94f06a5db5091ecc" ,
"f4803e78add4ee2f"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 24 ,
"y" : 959 ,
"w" : 1362 ,
"h" : 202
2021-08-26 16:24:14 +02:00
} ,
{
"id" : "1d9e4b26a824022f" ,
"type" : "group" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"name" : "EventSub Switch" ,
"style" : {
"stroke" : "#000000" ,
"fill" : "#c8e7a7" ,
"fill-opacity" : "0.49" ,
"label" : true ,
"color" : "#000000"
} ,
"nodes" : [
"4b779b18cfa18def" ,
"fee40a11987375da" ,
"c46892d6233c5391" ,
"03f134a19d11f009" ,
"0e717f858b8d799c" ,
"bd60cc12bad786d6" ,
"d1c64ebc8a5feec9" ,
"099c35a256887f74" ,
"35d2b6f068729230" ,
"9f4b9459d55f954b" ,
"d6b5f07cf744a7b2" ,
"66db194703a62045" ,
"789b0a1d5d87ac36" ,
"74325974cbdc5c90" ,
"353f3049743bafc3" ,
"85deb0b591c10ce6" ,
"e1ed82cfe4ac1c7b" ,
"dd04e54715766887" ,
"a69ac429f7a89027" ,
"7008cac6ebd21511" ,
"4f3290f9114221db" ,
"442489b5937e9783" ,
"8e64834c2e4ab9c6" ,
"14246c59203bf325" ,
"f76ce5c449b39ec1" ,
"ec063c27cbdff5bc" ,
"fc172da139ae610c" ,
"09ca04c0b1964ea9" ,
"3e4196fcfe60dd91" ,
"904fead80acf0883" ,
"57835b0e8181dc56" ,
"b97c23ba88296b1b" ,
"b4c1b467be768e4a" ,
"76a3218918c97560" ,
"90d9f9f778dfea84" ,
"1b82f3fefef1c56c" ,
"427e0239f95d69ba" ,
"f71de6f3f45ab546" ,
"aafeca1840745c1a" ,
"641360867f4299e0" ,
"956b7e15e56e3e6e" ,
"2557738c1c37389e" ,
"976a5ddd48218c96" ,
"aa03c725061760dd" ,
"c936ce23cdc37428" ,
"7cb22ecd302d5fe5" ,
"8b358c8a79eba44f" ,
"e2e09ba8297e6c08" ,
"91a14548331e78ff" ,
"74a51ad373778ee6" ,
"cb0ba07aa871111a" ,
"e8239ae110070f53" ,
"104b71d90f13b9fa" ,
"3b489bf1f69ab04e" ,
"e158862b2ad9e355" ,
"a3ee39814135cad2" ,
"4309ad73534e365c" ,
"2e435c1be18bebf7" ,
"07c0971dd23dd62d" ,
"59dac292ac05e5d8" ,
"9cae1c4a7541c723" ,
"52f26835eeca107c" ,
"03c5d3303b39046e" ,
"8fe676f729352bd3" ,
2022-02-18 13:13:10 +01:00
"870a89265d2adf1d" ,
"8a0b93500015be22"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 34 ,
"y" : 19 ,
"w" : 692 ,
2021-08-26 16:24:14 +02:00
"h" : 922
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c3a384b88e4aae92" ,
"type" : "group" ,
"z" : "bedf5b9469855c83" ,
"name" : "Events" ,
"style" : {
"stroke" : "#000000" ,
"fill" : "#c8e7a7" ,
"fill-opacity" : "0.51" ,
"label" : true ,
"color" : "#000000"
} ,
"nodes" : [
"7098c94cefad6f46" ,
"3c5392d536a6758c" ,
"d8d1f2dfc5c946e8" ,
"e3fdefc8024d75a1" ,
"781d8b6ea144560b" ,
"46a3a69959ede421" ,
"0706fa919a2b66b7" ,
"13aa39ce93155d90" ,
"22b9bd03717a6092" ,
"bc942504e9d6822a" ,
"c9bd7b1cdbdaca88" ,
"2e12e6b6e53b0967" ,
"f436b7331bd9609b" ,
"c4cd0c41321ef3bd" ,
"4c49467a35df9851" ,
"674ee05d36a01381" ,
"ca9267f59495a61e" ,
"c282f7bbe2ea94a6" ,
"6c6457495d5b73d4" ,
"0e8b1da7d78d9e04" ,
"216bb963f207e682" ,
"46a44352c8d66e56" ,
"d1e21ddc83cc908f" ,
"b7796720760df4ca" ,
"e7138cd2dc73b8c0" ,
"2a80b4bcb77e25b1" ,
"3ee0a398d56ce81b" ,
"2720e13c28d5f2a6" ,
"bb15db95da85594b" ,
"f23b95398eaa0fb5" ,
"c977fc48940eaa1f" ,
"0a6403e990465b45" ,
"e66321b5eebb9e62" ,
"013eac261f7f830a" ,
"82982a94bf2f96e5" ,
"7822bd853ff32202" ,
"440ca17ff1420dfe" ,
"e3a2b757bc7b4f00" ,
"bf777e01107c8dad" ,
"02eff79de54243df" ,
"cf8eb778297937fe" ,
"31b7edc241da122b" ,
"58059205d3b59963" ,
"d3ae76bd5a99fe61" ,
"4ce638dd76c24bdb" ,
"d8842a92a68f0e27" ,
"9438739a0d42032a" ,
"ba962cb706960ca3" ,
"3445992ddf31cb4e" ,
"bcf41039c5488aa0" ,
"2082c62be84dcf16" ,
"1d7fb21bf35a91b8" ,
"9f32750213a4f0c6" ,
"65537eb9b8bb35b8" ,
"c22851c0379367b6" ,
"df791e577307e9f7" ,
"44c07fb9fc35c75c" ,
"b30cfc59e8cbe783" ,
"97fecabe81f273fd" ,
"4f2895be0123f5f4" ,
"63c02972795b5176" ,
"e3d6d7b46a2d2955" ,
"aa6229c18fc2ac6d"
] ,
"env" : [ ] ,
"x" : 754 ,
"y" : 21.5 ,
"w" : 512 ,
"h" : 1219.5
} ,
{
"id" : "9fcc1ffb8aba8b21" ,
"type" : "ui_group" ,
"name" : "Subscribe" ,
"tab" : "4afe96710c08f056" ,
"order" : 2 ,
"disp" : true ,
"width" : "6" ,
"collapse" : false
} ,
{
"id" : "ee20fe791dedef03" ,
"type" : "ui_group" ,
"name" : "Unsubscribe" ,
"tab" : "4afe96710c08f056" ,
"order" : 3 ,
"disp" : true ,
"width" : 6 ,
"collapse" : false
} ,
{
"id" : "4afe96710c08f056" ,
"type" : "ui_tab" ,
"name" : "EventSub" ,
"icon" : "dashboard" ,
"order" : 13 ,
"disabled" : false ,
"hidden" : false
} ,
{
"id" : "174e8ee08b6a981f" ,
"type" : "ui_group" ,
"name" : "Settings" ,
"tab" : "4afe96710c08f056" ,
"order" : 1 ,
"disp" : true ,
"width" : "6" ,
"collapse" : false
} ,
{
"id" : "f0f95ba1.2e5f08" ,
"type" : "mqtt-broker" ,
"name" : "VPS" ,
"broker" : "lab.gervasi.be" ,
"port" : "1883" ,
"clientid" : "" ,
"autoConnect" : true ,
"usetls" : false ,
"compatmode" : false ,
"protocolVersion" : "3" ,
"keepalive" : "60" ,
"cleansession" : true ,
"birthTopic" : "" ,
"birthQos" : "0" ,
"birthPayload" : "" ,
"birthMsg" : { } ,
"closeTopic" : "" ,
"closeQos" : "0" ,
"closePayload" : "" ,
"closeMsg" : { } ,
"willTopic" : "" ,
"willQos" : "0" ,
"willPayload" : "" ,
"willMsg" : { } ,
"sessionExpiry" : ""
} ,
{
"id" : "abb6f1bda92477eb" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_base" ,
"theme" : {
"name" : "theme-dark" ,
"lightTheme" : {
"default" : "#0094CE" ,
"baseColor" : "#0094CE" ,
"baseFont" : "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" ,
"edited" : true ,
"reset" : false
} ,
"darkTheme" : {
"default" : "#097479" ,
"baseColor" : "#097479" ,
"baseFont" : "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" ,
"edited" : true ,
"reset" : false
} ,
"customTheme" : {
"name" : "Untitled Theme 1" ,
"default" : "#4B7930" ,
"baseColor" : "#4B7930" ,
"baseFont" : "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
} ,
"themeState" : {
"base-color" : {
"default" : "#097479" ,
"value" : "#097479" ,
"edited" : false
} ,
"page-titlebar-backgroundColor" : {
"value" : "#097479" ,
"edited" : false
} ,
"page-backgroundColor" : {
"value" : "#111111" ,
"edited" : false
} ,
"page-sidebar-backgroundColor" : {
"value" : "#333333" ,
"edited" : false
} ,
"group-textColor" : {
"value" : "#0eb8c0" ,
"edited" : false
} ,
"group-borderColor" : {
"value" : "#555555" ,
"edited" : false
} ,
"group-backgroundColor" : {
"value" : "#333333" ,
"edited" : false
} ,
"widget-textColor" : {
"value" : "#eeeeee" ,
"edited" : false
} ,
"widget-backgroundColor" : {
"value" : "#097479" ,
"edited" : false
} ,
"widget-borderColor" : {
"value" : "#333333" ,
"edited" : false
} ,
"base-font" : {
"value" : "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
}
} ,
"angularTheme" : {
"primary" : "indigo" ,
"accents" : "blue" ,
"warn" : "red" ,
"background" : "grey" ,
"palette" : "light"
}
} ,
"site" : {
"name" : "Node-RED Dashboard" ,
"hideToolbar" : "false" ,
"allowSwipe" : "false" ,
"lockMenu" : "false" ,
"allowTempTheme" : "true" ,
"dateFormat" : "DD/MM/YYYY" ,
"sizes" : {
"sx" : 48 ,
"sy" : 48 ,
"gx" : 6 ,
"gy" : 6 ,
"cx" : 6 ,
"cy" : 6 ,
"px" : 0 ,
"py" : 0
}
}
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "26d8d7df.be0958" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Format subscription" ,
"func" : "const Type = msg.type;\nmsg = {\n \"headers\" : {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken'),\n \"Accept\" : \"application/json\"\n },\n \"method\": \"POST\",\n \"url\" : \"https://api.twitch.tv/helix/eventsub/subscriptions\",\n \"payload\" : {\n \"type\": Type,\n \"version\": \"1\",\n \"condition\": {\n \"broadcaster_user_id\": flow.get('ChannelID')\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://\" + flow.get('SubURI') + \"/webhook\",\n \"secret\": flow.get('SubSecret')\n }\n }\n}\n\nif(Type == \"channel.raid\"){\n msg.payload.condition = {\n \"to_broadcaster_user_id\" : flow.get('ChannelID')\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 530 ,
"y" : 630 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"98d5cd6c.f2a68"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "98d5cd6c.f2a68" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"method" : "use" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"senderr" : false ,
"x" : 720 ,
"y" : 630 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"5bff93af.87898c" ,
"5e33e16d982b9232"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "f2b8d96b.d631b8" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Unsubscribe" ,
"func" : "const ID = msg.id;\nmsg = {\n \"headers\" : {\n \"Client-ID\" : flow.get('ClientID'),\n \"Authorization\" : flow.get('AppToken')\n },\n \"method\": \"DELETE\",\n \"url\": \"https://api.twitch.tv/helix/eventsub/subscriptions?id=\" + ID\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 550 ,
"y" : 710 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"f70bfcf8.11e1"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "f70bfcf8.11e1" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"method" : "use" ,
"ret" : "txt" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"x" : 720 ,
"y" : 710 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"2c9e19de6c1f6cd4"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "7dbcec20.5ced04" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Succes" ,
"func" : "msg.payload = \"Subscription successful\"\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 1050 ,
2021-08-26 16:24:14 +02:00
"y" : 540 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ce3d135404921045"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "5bff93af.87898c" ,
2021-08-26 16:24:14 +02:00
"type" : "switch" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "check status" ,
"property" : "statusCode" ,
"propertyType" : "msg" ,
"rules" : [
{
"t" : "eq" ,
"v" : "202" ,
"vt" : "num"
} ,
{
"t" : "eq" ,
"v" : "409" ,
"vt" : "num"
} ,
{
"t" : "eq" ,
"v" : "400" ,
"vt" : "num"
} ,
{
"t" : "eq" ,
"v" : "403" ,
"vt" : "num"
}
] ,
"checkall" : "true" ,
"repair" : false ,
"outputs" : 4 ,
2022-02-18 13:13:10 +01:00
"x" : 880 ,
"y" : 630 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"7dbcec20.5ced04"
2021-08-26 16:24:14 +02:00
] ,
[
2022-02-18 13:13:10 +01:00
"690eda34.2888d4"
2021-08-26 16:24:14 +02:00
] ,
[
2022-02-18 13:13:10 +01:00
"d3a93046ef612be8"
2021-08-26 16:24:14 +02:00
] ,
[
2022-02-18 13:13:10 +01:00
"7e0de8ca88627f13"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "690eda34.2888d4" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Already Exist" ,
"func" : "msg.payload = msg.payload.message;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 1060 ,
2021-08-26 16:24:14 +02:00
"y" : 580 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ce3d135404921045"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "d3a93046ef612be8" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Bad Request" ,
"func" : "msg.payload = msg.payload.message;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 1060 ,
2021-08-26 16:24:14 +02:00
"y" : 620 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ce3d135404921045"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "7e0de8ca88627f13" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Forbidden" ,
"func" : "msg.payload = msg.payload.message;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 1050 ,
2021-08-26 16:24:14 +02:00
"y" : 660 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ce3d135404921045"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "ec98aacb0f957338" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_dropdown" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"label" : "Subscription list" ,
"tooltip" : "" ,
"place" : "Select option" ,
"group" : "9fcc1ffb8aba8b21" ,
2022-02-18 13:13:10 +01:00
"order" : 4 ,
2021-08-26 16:24:14 +02:00
"width" : 6 ,
"height" : 1 ,
"passthru" : true ,
"multiple" : false ,
"options" : [
{
"label" : "Channel Update" ,
"value" : "channel.update" ,
"type" : "str"
} ,
{
"label" : "Follower" ,
"value" : "channel.follow" ,
"type" : "str"
} ,
{
"label" : "Subscriber" ,
"value" : "channel.subscribe" ,
"type" : "str"
} ,
{
"label" : "SubGift" ,
"value" : "channel.subscription.gift" ,
"type" : "str"
} ,
{
"label" : "Sub Message" ,
"value" : "channel.subscription.message" ,
"type" : "str"
} ,
{
"label" : "Bits" ,
"value" : "channel.cheer" ,
"type" : "str"
} ,
{
"label" : "Raid" ,
"value" : "channel.raid" ,
"type" : "str"
} ,
{
"label" : "Ban" ,
"value" : "channel.ban" ,
"type" : "str"
} ,
{
"label" : "Unban" ,
"value" : "channel.unban" ,
"type" : "str"
} ,
{
"label" : "Channel Point" ,
"value" : "channel.channel_points_custom_reward_redemption.add" ,
"type" : "str"
} ,
{
"label" : "Poll begin" ,
"value" : "channel.poll.begin" ,
"type" : "str"
} ,
{
"label" : "Poll Progress" ,
"value" : "channel.poll.progress" ,
"type" : "str"
} ,
{
"label" : "Poll end" ,
"value" : "channel.poll.end" ,
"type" : "str"
} ,
{
"label" : "Prediction begin" ,
"value" : "channel.prediction.begin" ,
"type" : "str"
} ,
{
"label" : "Prediction Progress" ,
"value" : "channel.prediction.progress" ,
"type" : "str"
} ,
{
"label" : "Prediction end" ,
"value" : "channel.prediction.end" ,
"type" : "str"
} ,
{
"label" : "HypeTrain begin" ,
"value" : "channel.hype_train.begin" ,
"type" : "str"
} ,
{
"label" : "HypeTrain Progress" ,
"value" : "channel.hype_train.progress" ,
"type" : "str"
} ,
{
"label" : "HypeTrain end" ,
"value" : "channel.hype_train.end" ,
"type" : "str"
} ,
{
"label" : "Stream ON" ,
"value" : "stream.online" ,
"type" : "str"
} ,
{
"label" : "Stream OFF" ,
"value" : "stream.offline" ,
"type" : "str"
}
] ,
"payload" : "" ,
"topic" : "topic" ,
2022-02-18 13:13:10 +01:00
"topicType" : "str" ,
"className" : "" ,
"x" : 130 ,
"y" : 540 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"fd85f36550d37557" ,
"ee66b6128ff85327"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "30982b64daa64b4f" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_button" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"group" : "9fcc1ffb8aba8b21" ,
2022-02-18 13:13:10 +01:00
"order" : 5 ,
2021-08-26 16:24:14 +02:00
"width" : 6 ,
"height" : 1 ,
"passthru" : false ,
"label" : "Subscribe" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "subscribe" ,
2022-02-18 13:13:10 +01:00
"x" : 110 ,
"y" : 630 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"8b713e9019cc4516"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "fd85f36550d37557" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_text" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"group" : "9fcc1ffb8aba8b21" ,
2022-02-18 13:13:10 +01:00
"order" : 6 ,
2021-08-26 16:24:14 +02:00
"width" : 6 ,
"height" : 1 ,
"name" : "" ,
"label" : "Selected subscription" ,
"format" : "{{msg.payload}}" ,
"layout" : "row-spread" ,
2022-02-18 13:13:10 +01:00
"className" : "" ,
"x" : 340 ,
"y" : 580 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "ce3d135404921045" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_text" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"group" : "9fcc1ffb8aba8b21" ,
2022-02-18 13:13:10 +01:00
"order" : 7 ,
2021-08-26 16:24:14 +02:00
"width" : 6 ,
"height" : 1 ,
"name" : "" ,
"label" : "Response" ,
"format" : "{{msg.payload}}" ,
"layout" : "row-spread" ,
2022-02-18 13:13:10 +01:00
"x" : 1240 ,
"y" : 540 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "3c4839ef38d1e5be" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Get active subscriptions" ,
"func" : "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken'),\n \"Accept\": \"application/json\"\n },\n \"url\": \"https://api.twitch.tv/helix/eventsub/subscriptions\"\n}\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 360 ,
"y" : 770 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"49ebc9ee3ff5553f"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "49ebc9ee3ff5553f" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"method" : "GET" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"senderr" : false ,
"x" : 560 ,
"y" : 770 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"6aa36f6125c38ddf"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "6aa36f6125c38ddf" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "List Sub ID" ,
2022-02-18 13:13:10 +01:00
"func" : "let Sub_ID = {};\nlet Channel_ID = \"\";\nlet Notif_Type = \"\";\nlet Notif_ID = \"\";\n\nfor (let i = 0; i < msg.payload.data.length ; i++){\n if (msg.payload.data[i].condition.hasOwnProperty(\"broadcaster_user_id\")){\n Channel_ID = msg.payload.data[i].condition.broadcaster_user_id;\n }\n else{\n Channel_ID = msg.payload.data[i].condition.to_broadcaster_user_id;\n }\n Notif_Type = msg.payload.data[i].type;\n Notif_ID = msg.payload.data[i].id;\n if (!Sub_ID.hasOwnProperty(Channel_ID)) {\n Sub_ID[Channel_ID] = {};\n }\n if (!Sub_ID[Channel_ID].hasOwnProperty(Notif_Type)) {\n Sub_ID[Channel_ID][Notif_Type] = Notif_ID;\n }\n}\n\nflow.set('Subscription_ID', Sub_ID);\nmsg.payload = Sub_ID;\nmsg.topic = \"Sub_ID\";\n\nreturn msg;\n\n" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 730 ,
"y" : 770 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"566b14e2f0568603" ,
"dd4a8a1e4291d855"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "84e31e98de53c8f6" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_button" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"group" : "ee20fe791dedef03" ,
"order" : 1 ,
2022-02-18 13:13:10 +01:00
"width" : 2 ,
2021-08-26 16:24:14 +02:00
"height" : 1 ,
"passthru" : false ,
"label" : "Refresh" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "topic" ,
2022-02-18 13:13:10 +01:00
"x" : 120 ,
"y" : 770 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"3c4839ef38d1e5be" ,
"1053bfdaa6f39afb"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "566b14e2f0568603" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Setup Dropdown" ,
2022-02-18 13:13:10 +01:00
"func" : "const Broadcaster_ID = flow.get('ChannelID');\nconst Sub_ID = flow.get('Subscription_ID')||{};\nconst Subscriptions = Sub_ID[Broadcaster_ID];\nmsg = {options : []}\n\nfor(var type in Subscriptions){\n msg.options.push({[type] : Subscriptions[type]})\n}\n\nreturn msg;" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 1160 ,
"y" : 770 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"a383193c03077b55"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "a383193c03077b55" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_dropdown" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"label" : "Active sub" ,
"tooltip" : "" ,
"place" : "Select option" ,
"group" : "ee20fe791dedef03" ,
2022-02-18 13:13:10 +01:00
"order" : 5 ,
"width" : 6 ,
"height" : 1 ,
2021-08-26 16:24:14 +02:00
"passthru" : true ,
"multiple" : false ,
"options" : [
{
"label" : "" ,
"value" : "" ,
"type" : "str"
}
] ,
"payload" : "" ,
"topic" : "topic" ,
"topicType" : "str" ,
2022-02-18 13:13:10 +01:00
"className" : "" ,
"x" : 1190 ,
"y" : 820 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"82b0797b3012e829" ,
"30fbfd9411298b86"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "f9c17dfc34ee6ddc" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_button" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"group" : "ee20fe791dedef03" ,
2022-02-18 13:13:10 +01:00
"order" : 2 ,
"width" : 2 ,
2021-08-26 16:24:14 +02:00
"height" : 1 ,
"passthru" : false ,
"label" : "Unsubscribe" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "unsubscribe" ,
"topicType" : "str" ,
2022-02-18 13:13:10 +01:00
"x" : 120 ,
"y" : 710 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ffae0df38c6c8c22"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c7fe8d294efda317" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_text" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"group" : "ee20fe791dedef03" ,
2022-02-18 13:13:10 +01:00
"order" : 7 ,
"width" : 6 ,
2021-08-26 16:24:14 +02:00
"height" : 1 ,
"name" : "" ,
"label" : "Response" ,
"format" : "{{msg.payload}}" ,
"layout" : "row-spread" ,
2022-02-18 13:13:10 +01:00
"x" : 1410 ,
"y" : 710 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "82b0797b3012e829" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_text" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"group" : "ee20fe791dedef03" ,
2022-02-18 13:13:10 +01:00
"order" : 6 ,
"width" : 6 ,
2021-08-26 16:24:14 +02:00
"height" : 1 ,
"name" : "" ,
"label" : "Selected unsubscription" ,
"format" : "{{msg.payload}}" ,
"layout" : "row-spread" ,
2022-02-18 13:13:10 +01:00
"x" : 1420 ,
"y" : 820 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "30fbfd9411298b86" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Save current UnSub" ,
"func" : "flow.set(\"unsubscription\", msg.payload);\nmsg.payload = \"waiting\";\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 1420 ,
"y" : 770 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c7fe8d294efda317"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "ee66b6128ff85327" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Save current Sub" ,
"func" : "flow.set(\"subscription\", msg.payload);\nmsg.payload = \"waiting\";\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 330 ,
"y" : 540 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ce3d135404921045"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "8b713e9019cc4516" ,
2021-08-26 16:24:14 +02:00
"type" : "change" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Set Subscription" ,
"rules" : [
{
"t" : "set" ,
"p" : "type" ,
"pt" : "msg" ,
"to" : "subscription" ,
"tot" : "flow"
}
] ,
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
2022-02-18 13:13:10 +01:00
"x" : 320 ,
"y" : 630 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"26d8d7df.be0958"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "ffae0df38c6c8c22" ,
2021-08-26 16:24:14 +02:00
"type" : "change" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "Set UnSubscription" ,
"rules" : [
{
"t" : "set" ,
"p" : "id" ,
"pt" : "msg" ,
"to" : "unsubscription" ,
"tot" : "flow"
}
] ,
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
2022-02-18 13:13:10 +01:00
"x" : 330 ,
"y" : 710 ,
"wires" : [
[
"f2b8d96b.d631b8"
]
]
} ,
{
"id" : "2c9e19de6c1f6cd4" ,
"type" : "function" ,
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "Response ?" ,
"func" : "if(msg.payload == \"\"){\n msg.payload = \"Unsubscription successful\";\n}\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 890 ,
"y" : 710 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c7fe8d294efda317"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "5e33e16d982b9232" ,
2021-08-26 16:24:14 +02:00
"type" : "debug" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "true" ,
"targetType" : "full" ,
"statusVal" : "" ,
"statusType" : "auto" ,
2022-02-18 13:13:10 +01:00
"x" : 870 ,
"y" : 580 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "dd4a8a1e4291d855" ,
"type" : "function" ,
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "List Subscriptions" ,
"func" : "let IDs = context.get(\"IDs\")||[];\nlet Length = context.get(\"Length\")||0;\nlet Counter = context.get(\"Counter\")||0;\nlet Usernames = context.get(\"Usernames\")||{};\nlet Sub_ID = flow.get('Subscription_ID') || {};\n\n\nif (Object.keys(msg.payload).length === 0){\n msg = { options: [] };\n return [null, null, msg];\n}\nif (msg.topic == \"Sub_ID\"){\n IDs = Object.keys(Sub_ID);\n Length = IDs.length;\n Counter = 0;\n context.set(\"IDs\", IDs);\n context.set(\"Length\", Length);\n context.set(\"Counter\", Counter);\n return [{ payload: parseInt(IDs[0]) }, null];\n}\n\nif(Counter < Length -1){\n Usernames[msg.payload.data[0].broadcaster_login] = IDs[Counter];\n context.set(\"Usernames\", Usernames);\n context.set(\"Counter\", Counter + 1);\n return [{ payload: parseInt(IDs[Counter +1])}, null];\n}\nelse{\n Usernames[msg.payload.data[0].broadcaster_login] = IDs[Counter];\n msg = { options: [] };\n for (var username in Usernames) {\n msg.options.push({ [username]: [username] })\n }\n return [null, msg];\n}\n" ,
2021-08-26 16:24:14 +02:00
"outputs" : 3 ,
2022-02-18 13:13:10 +01:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 750 ,
"y" : 820 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"bcb057363ba3c378" ,
"bcb057363ba3c378"
2021-08-26 16:24:14 +02:00
] ,
[
2022-02-18 13:13:10 +01:00
"d2fd9327385f9448" ,
"d2fd9327385f9448" ,
"6a40e123a2c65178"
2021-08-26 16:24:14 +02:00
] ,
[
2022-02-18 13:13:10 +01:00
"6a40e123a2c65178" ,
"d2fd9327385f9448"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "bcb057363ba3c378" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "Request channel Name" ,
"func" : "msg = {\n \"headers\": {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken')\n },\n \"url\": 'https://api.twitch.tv/helix/channels?broadcaster_id=' + msg.payload\n}\nreturn msg;" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 1000 ,
"y" : 870 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"8a66fd4794b48b1b" ,
"8a66fd4794b48b1b"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "d2fd9327385f9448" ,
"type" : "ui_dropdown" ,
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "" ,
"label" : "Channels" ,
"tooltip" : "" ,
"place" : "Select option" ,
"group" : "ee20fe791dedef03" ,
"order" : 4 ,
"width" : 6 ,
"height" : 1 ,
"passthru" : true ,
"multiple" : false ,
"options" : [
{
"label" : "" ,
"value" : "" ,
"type" : "str"
}
] ,
"payload" : "" ,
"topic" : "topic" ,
"topicType" : "str" ,
"className" : "" ,
"x" : 950 ,
"y" : 820 ,
"wires" : [
[
"697267a917a5ede1"
]
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "8a66fd4794b48b1b" ,
"type" : "http request" ,
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "Request" ,
"method" : "GET" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
"senderr" : false ,
"x" : 1190 ,
"y" : 870 ,
"wires" : [
[
"dd4a8a1e4291d855" ,
"dd4a8a1e4291d855"
]
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "697267a917a5ede1" ,
2021-08-26 16:24:14 +02:00
"type" : "link out" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "Username" ,
"mode" : "link" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"645e4c286635a52f"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 1035 ,
"y" : 820 ,
"wires" : [ ]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e3011972045e8564" ,
"type" : "ui_button" ,
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "" ,
"group" : "ee20fe791dedef03" ,
"order" : 3 ,
"width" : 2 ,
"height" : 1 ,
"passthru" : false ,
"label" : "{{text}}" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "{{color}}" ,
"className" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "topic" ,
"topicType" : "str" ,
2021-08-26 16:24:14 +02:00
"x" : 940 ,
2022-02-18 13:13:10 +01:00
"y" : 910 ,
2021-08-26 16:24:14 +02:00
"wires" : [
2022-02-18 13:13:10 +01:00
[ ]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "1053bfdaa6f39afb" ,
"type" : "change" ,
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "Color" ,
"rules" : [
2021-08-26 16:24:14 +02:00
{
2022-02-18 13:13:10 +01:00
"t" : "set" ,
"p" : "color" ,
"pt" : "msg" ,
"to" : "RED" ,
"tot" : "str"
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"t" : "set" ,
"p" : "text" ,
"pt" : "msg" ,
"to" : "WAIT !" ,
"tot" : "str"
2021-08-26 16:24:14 +02:00
}
] ,
2022-02-18 13:13:10 +01:00
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
"x" : 710 ,
"y" : 910 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e3011972045e8564"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "6a40e123a2c65178" ,
2021-08-26 16:24:14 +02:00
"type" : "change" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "Color" ,
2021-08-26 16:24:14 +02:00
"rules" : [
{
"t" : "set" ,
2022-02-18 13:13:10 +01:00
"p" : "color" ,
"pt" : "msg" ,
"to" : "GREEN" ,
"tot" : "str"
} ,
{
"t" : "set" ,
"p" : "text" ,
"pt" : "msg" ,
"to" : "Ready" ,
"tot" : "str"
2021-08-26 16:24:14 +02:00
}
] ,
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
2022-02-18 13:13:10 +01:00
"x" : 710 ,
"y" : 870 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e3011972045e8564"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c6a0489a3ee00082" ,
"type" : "link in" ,
"z" : "df207830040c7255" ,
"g" : "20a1fcbd1d2fea63" ,
"name" : "Username OK" ,
"links" : [
"b9d57c51dcfa392e"
] ,
"x" : 1035 ,
"y" : 750 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"566b14e2f0568603"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "beab0c19.6d93b" ,
2021-08-26 16:24:14 +02:00
"type" : "inject" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Settings" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
2022-02-18 13:13:10 +01:00
"once" : false ,
2021-08-26 16:24:14 +02:00
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
2022-02-18 13:13:10 +01:00
"x" : 120 ,
2021-08-26 16:24:14 +02:00
"y" : 110 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"966a372a.a07628"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "966a372a.a07628" ,
2021-08-26 16:24:14 +02:00
"type" : "change" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "API Settings " ,
2021-08-26 16:24:14 +02:00
"rules" : [
{
"t" : "set" ,
"p" : "ClientID" ,
"pt" : "flow" ,
2022-02-18 13:13:10 +01:00
"to" : "CLIENT ID" ,
2021-08-26 16:24:14 +02:00
"tot" : "str"
} ,
{
"t" : "set" ,
"p" : "ClientSecret" ,
"pt" : "flow" ,
2022-02-18 13:13:10 +01:00
"to" : "CLIENT SECRET" ,
2021-08-26 16:24:14 +02:00
"tot" : "str"
} ,
{
"t" : "set" ,
2022-02-18 13:13:10 +01:00
"p" : "Channel" ,
2021-08-26 16:24:14 +02:00
"pt" : "flow" ,
2022-02-18 13:13:10 +01:00
"to" : "ioodyme" ,
2021-08-26 16:24:14 +02:00
"tot" : "str"
} ,
{
"t" : "set" ,
2022-02-18 13:13:10 +01:00
"p" : "ChannelID" ,
2021-08-26 16:24:14 +02:00
"pt" : "flow" ,
2022-02-18 13:13:10 +01:00
"to" : "CHANNEL ID" ,
"tot" : "str"
} ,
{
"t" : "set" ,
"p" : "SubSecret" ,
"pt" : "flow" ,
"to" : "SUB SECRET" ,
2021-08-26 16:24:14 +02:00
"tot" : "str"
} ,
{
"t" : "set" ,
"p" : "SubURI" ,
"pt" : "flow" ,
"to" : "SUB URI" ,
"tot" : "str"
} ,
{
"t" : "set" ,
"p" : "Scopes" ,
"pt" : "flow" ,
"to" : "bits:read channel:manage:broadcast channel:manage:polls channel:manage:predictions channel:manage:redemptions channel:read:polls channel:read:predictions channel:read:redemptions channel:read:subscriptions moderation:read user:read:follows user:read:subscriptions channel:moderate channel:read:hype_train" ,
"tot" : "str"
}
] ,
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
2022-02-18 13:13:10 +01:00
"x" : 310 ,
2021-08-26 16:24:14 +02:00
"y" : 110 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ad6618efadfffb7c" ,
"d063ce8e1987378e"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "a9ab8eef.baa2" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Request channel ID" ,
2022-02-18 13:13:10 +01:00
"func" : "let channel = flow.get(\"Channel\");\nif (msg.topic == \"username\") {\n channel = msg.payload;\n}\n\nmsg = {\n \"headers\": {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken')\n },\n \"url\": 'https://api.twitch.tv/helix/search/channels?query=' + channel + \"&first=1\"\n}\nreturn msg;" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 330 ,
"y" : 320 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"566f2428.09694c"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "566f2428.09694c" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Channel ID" ,
"method" : "GET" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"senderr" : false ,
"x" : 530 ,
"y" : 320 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"b8602e99.36c57" ,
"e6f5f8a94cc12207" ,
"527713e229815eae"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "b8602e99.36c57" ,
2021-08-26 16:24:14 +02:00
"type" : "change" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"rules" : [
{
"t" : "set" ,
"p" : "ChannelID" ,
"pt" : "flow" ,
"to" : "msg.payload.data[0].id" ,
"tot" : "msg"
}
] ,
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
2022-02-18 13:13:10 +01:00
"x" : 720 ,
"y" : 280 ,
2021-08-26 16:24:14 +02:00
"wires" : [
2022-02-18 13:13:10 +01:00
[
"b9d57c51dcfa392e"
]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "fd63f4262302c5b3" ,
2021-08-26 16:24:14 +02:00
"type" : "http in" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"url" : "/apptoken" ,
"method" : "get" ,
"upload" : false ,
"swaggerDoc" : "" ,
2022-02-18 13:13:10 +01:00
"x" : 130 ,
2021-08-26 16:24:14 +02:00
"y" : 160 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"7ac706a80063eebd" ,
"eff64b41360d736d"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "7ac706a80063eebd" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Request APP Token" ,
"func" : "msg = {};\nmsg.url = \"https://id.twitch.tv/oauth2/token\";\nmsg.url += \"?client_id=\" + flow.get('ClientID');\nmsg.url += \"&client_secret=\" + flow.get('ClientSecret');\nmsg.url += \"&grant_type=client_credentials\";\nmsg.url += \"&scope=\" + flow.get('Scopes');\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 340 ,
2021-08-26 16:24:14 +02:00
"y" : 160 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c93450a865e58d44"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c93450a865e58d44" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"method" : "POST" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"senderr" : false ,
"x" : 530 ,
2021-08-26 16:24:14 +02:00
"y" : 160 ,
"wires" : [
[
2022-02-18 13:13:10 +01:00
"252b179b82c058d7"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "252b179b82c058d7" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Save Bearer" ,
"func" : "const Token = \"Bearer \" + msg.payload[\"access_token\"];\nflow.set('AppToken', Token);\nreturn;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 720 ,
2021-08-26 16:24:14 +02:00
"y" : 160 ,
"wires" : [
[ ]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "293eff994c230d75" ,
2021-08-26 16:24:14 +02:00
"type" : "http response" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Response" ,
"statusCode" : "" ,
"headers" : { } ,
2022-02-18 13:13:10 +01:00
"x" : 520 ,
2021-08-26 16:24:14 +02:00
"y" : 200 ,
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e0b907cdd8ccc1cf" ,
2021-08-26 16:24:14 +02:00
"type" : "http in" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"url" : "/usertoken" ,
"method" : "get" ,
"upload" : false ,
"swaggerDoc" : "" ,
2022-02-18 13:13:10 +01:00
"x" : 130 ,
"y" : 240 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"3b0aad40327d2546" ,
"ecd9237822214175"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "3b0aad40327d2546" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Request USER Token" ,
"func" : "const code = msg.payload.code;\nmsg = {};\nmsg.url = \"https://id.twitch.tv/oauth2/token?\";\nmsg.url += \"client_id=\" + flow.get('ClientID');\nmsg.url += \"&client_secret=\" + flow.get('ClientSecret');\nmsg.url += \"&code=\" + code;\nmsg.url += \"&grant_type=authorization_code\";\nmsg.url += \"&redirect_uri=https://\" + flow.get('SubURI') + \"/debug\";\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 340 ,
"y" : 240 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"1112a9e81345ea8b"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "1112a9e81345ea8b" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"method" : "POST" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"senderr" : false ,
"x" : 530 ,
"y" : 240 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"9a8612014ad4c799"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "9a8612014ad4c799" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Save Bearer" ,
"func" : "const Token = \"Bearer \" + msg.payload[\"access_token\"];\nflow.set('UserToken', Token);\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 700 ,
"y" : 240 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[ ]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "379327a91b22c7dd" ,
2021-08-26 16:24:14 +02:00
"type" : "http response" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Response" ,
"statusCode" : "" ,
"headers" : { } ,
2022-02-18 13:13:10 +01:00
"x" : 520 ,
"y" : 280 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e44ac409f8d18e83" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_template" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"group" : "174e8ee08b6a981f" ,
2021-08-26 16:24:14 +02:00
"name" : "Authorize App" ,
2022-02-18 13:13:10 +01:00
"order" : 2 ,
2021-08-26 16:24:14 +02:00
"width" : 3 ,
"height" : 1 ,
"format" : "" ,
"storeOutMessages" : true ,
"fwdInMessages" : true ,
"resendOnRefresh" : true ,
"templateScope" : "local" ,
2022-02-18 13:13:10 +01:00
"x" : 540 ,
"y" : 110 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[ ]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "8b2294e6bc52446d" ,
2021-08-26 16:24:14 +02:00
"type" : "ui_template" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"group" : "174e8ee08b6a981f" ,
2021-08-26 16:24:14 +02:00
"name" : "Authorize User" ,
2022-02-18 13:13:10 +01:00
"order" : 3 ,
2021-08-26 16:24:14 +02:00
"width" : 3 ,
"height" : 1 ,
"format" : "" ,
"storeOutMessages" : true ,
"fwdInMessages" : true ,
"resendOnRefresh" : true ,
"templateScope" : "local" ,
"x" : 730 ,
2022-02-18 13:13:10 +01:00
"y" : 110 ,
2021-08-26 16:24:14 +02:00
"wires" : [
2022-02-18 13:13:10 +01:00
[ ]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "3f7a96c6437a13b9" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Validate User Token" ,
"func" : "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('AppID'),\n \"Authorization\": flow.get('UserToken'),\n \"Accept\" : \"application/vnd.twitchtv.v5+json\"\n },\n \"url\": \"https://id.twitch.tv/oauth2/validate\"\n}\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 340 ,
"y" : 360 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"a0c81e642c7a3105"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "a0c81e642c7a3105" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Request" ,
"method" : "GET" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"x" : 520 ,
"y" : 360 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"2c4a0a29dd209504"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "ad6618efadfffb7c" ,
2021-08-26 16:24:14 +02:00
"type" : "template" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Authorize App" ,
"field" : "template" ,
"fieldType" : "msg" ,
"format" : "handlebars" ,
"syntax" : "mustache" ,
2022-02-18 13:13:10 +01:00
"template" : "<!DOCTYPE html>\n<html>\n\n<body>\n <script>\n var redirectApp = function(){\n window.location.href = \"https://id.twitch.tv/oauth2/authorize?client_id={{flow.ClientID}}&redirect_uri=https://{{flow.SubURI}}/apptoken&response_type=token&scope={{flow.Scopes}}\";\n }\n </script>\n \n <md-button onclick=\"redirectApp()\">Authorize APP</md-button>\n</body>\n\n</html>" ,
2021-08-26 16:24:14 +02:00
"output" : "str" ,
2022-02-18 13:13:10 +01:00
"x" : 540 ,
"y" : 70 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e44ac409f8d18e83"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "d063ce8e1987378e" ,
2021-08-26 16:24:14 +02:00
"type" : "template" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Authorize User" ,
"field" : "template" ,
"fieldType" : "msg" ,
"format" : "handlebars" ,
"syntax" : "mustache" ,
2022-02-18 13:13:10 +01:00
"template" : "<!DOCTYPE html>\n<html>\n\n<body>\n <script>\n var redirectUser = function(){\n window.location.href = \"https://id.twitch.tv/oauth2/authorize?client_id={{flow.ClientID}}&redirect_uri=https://{{flow.SubURI}}/usertoken&response_type=code&scope={{flow.Scopes}}\";\n }\n </script>\n \n <md-button onclick=\"redirectUser()\">Authorize USER</md-button>\n</body>\n\n</html>" ,
2021-08-26 16:24:14 +02:00
"output" : "str" ,
2022-02-18 13:13:10 +01:00
"x" : 730 ,
"y" : 70 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"8b2294e6bc52446d"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "2c88d43747076c97" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Validate App Token" ,
"func" : "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('AppID'),\n \"Authorization\": flow.get('AppToken'),\n \"Accept\" : \"application/vnd.twitchtv.v5+json\"\n },\n \"url\": \"https://id.twitch.tv/oauth2/validate\"\n}\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 330 ,
"y" : 400 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e35fd443178b1637"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e35fd443178b1637" ,
2021-08-26 16:24:14 +02:00
"type" : "http request" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "Request" ,
"method" : "GET" ,
"ret" : "obj" ,
"paytoqs" : "ignore" ,
"url" : "" ,
"tls" : "" ,
"persist" : false ,
"proxy" : "" ,
"authType" : "" ,
2022-02-18 13:13:10 +01:00
"x" : 520 ,
"y" : 400 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"2b8377a30ae7e578"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "d7b248978206a06f" ,
"type" : "ui_text_input" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "" ,
"label" : "Username" ,
"tooltip" : "" ,
"group" : "9fcc1ffb8aba8b21" ,
"order" : 1 ,
"width" : 4 ,
"height" : 1 ,
"passthru" : true ,
"mode" : "text" ,
"delay" : "0" ,
"topic" : "username" ,
"sendOnBlur" : true ,
"className" : "" ,
"topicType" : "str" ,
"x" : 130 ,
"y" : 320 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"a9ab8eef.baa2"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "b1096a477fb9abe5" ,
"type" : "ui_text" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"group" : "9fcc1ffb8aba8b21" ,
"order" : 3 ,
"width" : 4 ,
"height" : 1 ,
"name" : "" ,
"label" : "ID :" ,
"format" : "{{msg.payload}}" ,
"layout" : "row-left" ,
"className" : "" ,
"x" : 820 ,
"y" : 320 ,
"wires" : [ ]
} ,
{
"id" : "055dadece0fd3af6" ,
"type" : "ui_button" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "" ,
"group" : "174e8ee08b6a981f" ,
"order" : 6 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"label" : "Test token" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "topic" ,
"topicType" : "msg" ,
"x" : 130 ,
"y" : 380 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"3f7a96c6437a13b9" ,
"2c88d43747076c97"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "aea1f7b492402c01" ,
"type" : "ui_button" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "User" ,
"group" : "174e8ee08b6a981f" ,
"order" : 5 ,
"width" : 3 ,
"height" : 1 ,
"passthru" : false ,
"label" : "" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "{{payload}}" ,
"className" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "topic" ,
"topicType" : "msg" ,
"x" : 680 ,
"y" : 410 ,
"wires" : [
[ ]
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "4d6e5b640e32530c" ,
"type" : "ui_button" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "App" ,
"group" : "174e8ee08b6a981f" ,
"order" : 4 ,
"width" : 3 ,
"height" : 1 ,
"passthru" : false ,
"label" : "" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "{{payload}}" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "topic" ,
"topicType" : "msg" ,
"x" : 680 ,
"y" : 450 ,
2021-08-26 16:24:14 +02:00
"wires" : [
2022-02-18 13:13:10 +01:00
[ ]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "2b8377a30ae7e578" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Test App" ,
"func" : "if (msg.statusCode == 401) {\n return {payload : \"RED\"};\n}\nelse if(msg.statusCode == 200){\n return { payload: \"GREEN\" }\n}\n" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 300 ,
"y" : 450 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"4d6e5b640e32530c"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "2c4a0a29dd209504" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Test User" ,
"func" : "if (msg.statusCode == 401) {\n return {payload : \"RED\"};\n}\nelse if(msg.statusCode == 200){\n return { payload: \"GREEN\" }\n}\n" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 520 ,
"y" : 450 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"aea1f7b492402c01"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "18a0ecdb51dce96a" ,
"type" : "ui_form" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
2022-02-18 13:13:10 +01:00
"label" : "Settings" ,
"group" : "174e8ee08b6a981f" ,
"order" : 1 ,
"width" : 0 ,
"height" : 0 ,
"options" : [
{
"label" : "Client ID" ,
"value" : "ClientID" ,
"type" : "text" ,
"required" : false ,
"rows" : null
} ,
{
"label" : "Client Secret" ,
"value" : "ClientSecret" ,
"type" : "text" ,
"required" : false ,
"rows" : null
} ,
{
"label" : "Sub Secret" ,
"value" : "SubSecret" ,
"type" : "text" ,
"required" : false ,
"rows" : null
} ,
{
"label" : "Channel" ,
"value" : "Channel" ,
"type" : "text" ,
"required" : false ,
"rows" : null
} ,
{
"label" : "Sub URI" ,
"value" : "SubURI" ,
"type" : "text" ,
"required" : false ,
"rows" : null
} ,
{
"label" : "Scopes" ,
"value" : "Scopes" ,
"type" : "text" ,
"required" : false ,
"rows" : null
}
] ,
"formValue" : {
"ClientID" : "" ,
"ClientSecret" : "" ,
"SubSecret" : "" ,
"Channel" : "" ,
"SubURI" : "" ,
"Scopes" : ""
} ,
"payload" : "" ,
"submit" : "submit" ,
"cancel" : "cancel" ,
"topic" : "topic" ,
"topicType" : "msg" ,
"splitLayout" : true ,
"className" : "" ,
"x" : 130 ,
"y" : 70 ,
"wires" : [
[
"a70f82e316ae9b20"
]
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "a70f82e316ae9b20" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Save settings" ,
"func" : "for (var key in msg.payload) {\n if (msg.payload[key] != \"\") {\n flow.set(key, msg.payload[key]);\n }\n}\nreturn { payload: \"OK\" };" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 310 ,
"y" : 70 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ad6618efadfffb7c" ,
"d063ce8e1987378e"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "eff64b41360d736d" ,
"type" : "template" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Reponse" ,
"field" : "payload" ,
"fieldType" : "msg" ,
"format" : "handlebars" ,
"syntax" : "mustache" ,
"template" : "<html>\n <head>\n <meta http-equiv=\"refresh\" content=\"2; URL=https://{{flow.SubURI}}/ui\" />\n </head>\n\n <body>\n <h1> App Token generated</h1>\n <p>If you are not redirected after 2 sec, <a href=\"https://{{flow.SubURI}}/ui\">click here</a>.</p>\n </body>\n\n</html>" ,
"output" : "str" ,
"x" : 300 ,
"y" : 200 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"293eff994c230d75"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "ecd9237822214175" ,
"type" : "template" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Response" ,
"field" : "payload" ,
"fieldType" : "msg" ,
"format" : "handlebars" ,
"syntax" : "mustache" ,
"template" : "<html>\n <head>\n <meta http-equiv=\"refresh\" content=\"2; URL=https://{{flow.SubURI}}/ui\" />\n </head>\n\n <body>\n <h1> User Token generated</h1>\n <p>If you are not redirected after 2 sec, <a href=\"https://{{flow.SubURI}}/ui\">click here</a>.</p>\n </body>\n\n</html>" ,
"output" : "str" ,
"x" : 300 ,
"y" : 280 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"379327a91b22c7dd"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e6f5f8a94cc12207" ,
"type" : "change" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Get ID" ,
"rules" : [
{
"t" : "set" ,
"p" : "payload" ,
"pt" : "msg" ,
"to" : "payload.data[0].id" ,
"tot" : "msg"
}
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
"x" : 680 ,
"y" : 320 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"b1096a477fb9abe5"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "4c3ce8432cc7554a" ,
"type" : "ui_template" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"group" : "9fcc1ffb8aba8b21" ,
"name" : "IMG" ,
"order" : 2 ,
"width" : 2 ,
"height" : 2 ,
"format" : "<p>\n <img src=\"{{msg.payload}}\" width=\"80%\"/>\n</p>" ,
"storeOutMessages" : true ,
"fwdInMessages" : true ,
"resendOnRefresh" : true ,
"templateScope" : "local" ,
"className" : "" ,
"x" : 820 ,
"y" : 360 ,
"wires" : [
[ ]
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "527713e229815eae" ,
"type" : "change" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Get IMG" ,
"rules" : [
{
"t" : "set" ,
"p" : "payload" ,
"pt" : "msg" ,
"to" : "payload.data[0].thumbnail_url" ,
"tot" : "msg"
}
] ,
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
"x" : 690 ,
"y" : 360 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"4c3ce8432cc7554a"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "645e4c286635a52f" ,
2021-08-26 16:24:14 +02:00
"type" : "link in" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Username" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"697267a917a5ede1"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 75 ,
"y" : 280 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"d7b248978206a06f"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "b9d57c51dcfa392e" ,
"type" : "link out" ,
"z" : "df207830040c7255" ,
"g" : "fbd6b9fb.b67658" ,
"name" : "Username OK" ,
"mode" : "link" ,
"links" : [
"c6a0489a3ee00082"
] ,
"x" : 855 ,
"y" : 280 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "172852334e067eab" ,
"type" : "http in" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "WebHook" ,
"url" : "/webhook" ,
"method" : "post" ,
"upload" : false ,
"swaggerDoc" : "" ,
"x" : 110 ,
"y" : 1050 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"0953d456cfdb4563" ,
"189539cfa8fd4634"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "a14899d1bdaee6ae" ,
"type" : "switch" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Type ?" ,
"property" : "req.headers[\"twitch-eventsub-message-type\"]" ,
"propertyType" : "msg" ,
"rules" : [
{
"t" : "eq" ,
"v" : "webhook_callback_verification" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "notification" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "revocation" ,
"vt" : "str"
}
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"checkall" : "true" ,
"repair" : false ,
"outputs" : 3 ,
"x" : 590 ,
"y" : 1090 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"b99ebb122e5c2d93"
] ,
[
"e9b516c0427c7331"
] ,
[
"9bae08932a4b918f"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e9b516c0427c7331" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Notification" ,
"func" : "msg.statusCode = 200;\nreturn msg" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 760 ,
"y" : 1080 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"09b3f14a7ec50bce" ,
"e2b1a1d555abedaa"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "9bae08932a4b918f" ,
"type" : "link out" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "WebHook revocation" ,
"mode" : "link" ,
"links" : [ ] ,
"x" : 705 ,
"y" : 1120 ,
"wires" : [ ]
} ,
{
"id" : "b99ebb122e5c2d93" ,
"type" : "function" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Subscription" ,
"func" : "msg.payload = msg.payload.challenge.toString();\nmsg.statusCode = 200;\nreturn msg" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 760 ,
"y" : 1040 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e2b1a1d555abedaa"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e2b1a1d555abedaa" ,
"type" : "http response" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Response" ,
"statusCode" : "" ,
"headers" : { } ,
"x" : 910 ,
"y" : 1040 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "496beddfeba0baee" ,
"type" : "link out" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "WebHook Notification" ,
"mode" : "link" ,
"links" : [
"03f134a19d11f009"
] ,
"x" : 1260 ,
"y" : 1080 ,
"wires" : [ ] ,
"l" : true
} ,
{
"id" : "09b3f14a7ec50bce" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "ID Filter" ,
"func" : "let IDList = flow.get('EventID')||[];\nlet ID = msg.req.headers[\"twitch-eventsub-message-id\"];\n\nif(!IDList.includes(ID)){\n IDList.push(ID);\n flow.set('EventID', IDList);\n return msg;\n}\n\n" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 910 ,
"y" : 1080 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"94f06a5db5091ecc" ,
"f4803e78add4ee2f"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "8c2a43d196ec7e5c" ,
"type" : "inject" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"repeat" : "3600" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 760 ,
"y" : 1000 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"83822eaec1eca52b"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "83822eaec1eca52b" ,
"type" : "change" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
2022-02-18 13:13:10 +01:00
"rules" : [
{
"t" : "set" ,
"p" : "EventID" ,
"pt" : "flow" ,
"to" : "[]" ,
"tot" : "json"
}
] ,
"action" : "" ,
"property" : "" ,
"from" : "" ,
"to" : "" ,
"reg" : false ,
"x" : 930 ,
"y" : 1000 ,
"wires" : [
[ ]
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "9ae2fc3a337f9a0e" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Signature match ?" ,
"func" : "const Request = flow.get('Req_To_Test');\nflow.set('Req_To_Test', {});\nconst Signature_To_Test = Request.req.headers[\"twitch-eventsub-message-signature\"];\nconst Signature = \"sha256=\" + msg.payload;\n\nif(Signature_To_Test == Signature){\n return Request;\n}" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 420 ,
"y" : 1090 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"a14899d1bdaee6ae"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "70fdfa29ec214ea2" ,
"type" : "hmac" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "" ,
"algorithm" : "HmacSHA256" ,
"key" : "NA" ,
"x" : 260 ,
"y" : 1090 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"9ae2fc3a337f9a0e"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "189539cfa8fd4634" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Signature verification" ,
"func" : "const ID = msg.req.headers[\"twitch-eventsub-message-id\"];\nconst TS = msg.req.headers[\"twitch-eventsub-message-timestamp\"];\nconst Body = JSON.stringify(msg.req.body);\n\nmsg.secrectkey = flow.get('SubSecret');\nmsg.payload = ID + TS + Body;\n\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 310 ,
"y" : 1050 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"70fdfa29ec214ea2"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "0953d456cfdb4563" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Save Request" ,
"func" : "flow.set(\"Req_To_Test\", msg);\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 290 ,
"y" : 1010 ,
2021-08-26 16:24:14 +02:00
"wires" : [
2022-02-18 13:13:10 +01:00
[ ]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "94f06a5db5091ecc" ,
"type" : "switch" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "Channel ID" ,
"property" : "payload.event.broadcaster_user_id" ,
"propertyType" : "msg" ,
"rules" : [
{
"t" : "eq" ,
"v" : "ChannelID" ,
"vt" : "flow"
} ,
{
"t" : "else"
}
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"checkall" : "false" ,
"repair" : false ,
2021-08-26 16:24:14 +02:00
"outputs" : 2 ,
2022-02-18 13:13:10 +01:00
"x" : 1060 ,
"y" : 1080 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"496beddfeba0baee"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
[ ]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "f4803e78add4ee2f" ,
"type" : "switch" ,
"z" : "df207830040c7255" ,
"g" : "da23423c6c5ba9f9" ,
"name" : "To Channel ID" ,
"property" : "payload.event.to_broadcaster_user_id" ,
"propertyType" : "msg" ,
"rules" : [
{
"t" : "eq" ,
"v" : "ChannelID" ,
"vt" : "flow"
} ,
{
"t" : "else"
}
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"checkall" : "false" ,
"repair" : false ,
"outputs" : 2 ,
"x" : 1070 ,
"y" : 1120 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"496beddfeba0baee"
] ,
[ ]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "4b779b18cfa18def" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Sub" ,
"func" : "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscribe\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"tier\": \"1000\",\n \"is_gift\": false\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 290 ,
"y" : 180 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c46892d6233c5391"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "fee40a11987375da" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Follow" ,
"func" : "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.follow\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"followed_at\": \"2020-07-15T18:16:11.17106713Z\"\n }\n}\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 300 ,
"y" : 140 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c46892d6233c5391"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c46892d6233c5391" ,
"type" : "switch" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
2022-02-18 13:13:10 +01:00
"property" : "payload.subscription.type" ,
"propertyType" : "msg" ,
"rules" : [
{
"t" : "eq" ,
"v" : "channel.update" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.follow" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.subscribe" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.subscription.gift" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.subscription.message" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.cheer" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.raid" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.ban" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.unban" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.channel_points_custom_reward_redemption.add" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.poll.begin" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.poll.progress" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.poll.end" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.prediction.begin" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.prediction.progress" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.prediction.end" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.hype_train.begin" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.hype_train.progress" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "channel.hype_train.end" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "stream.online" ,
"vt" : "str"
} ,
{
"t" : "eq" ,
"v" : "stream.offline" ,
"vt" : "str"
}
] ,
"checkall" : "true" ,
"repair" : false ,
"outputs" : 21 ,
"x" : 520 ,
"y" : 460 ,
"wires" : [
[
"d1c64ebc8a5feec9"
] ,
[
"099c35a256887f74"
] ,
[
"35d2b6f068729230"
] ,
[
"66db194703a62045"
] ,
[
"7008cac6ebd21511"
] ,
[
"e1ed82cfe4ac1c7b"
] ,
[
"8e64834c2e4ab9c6"
] ,
[
"3e4196fcfe60dd91"
] ,
[
"ec063c27cbdff5bc"
] ,
[
"b97c23ba88296b1b"
] ,
[
"f71de6f3f45ab546"
] ,
[
"52f26835eeca107c"
] ,
[
"90d9f9f778dfea84"
] ,
[
"956b7e15e56e3e6e"
] ,
[
"03c5d3303b39046e"
] ,
[
"8b358c8a79eba44f"
] ,
[
"aa03c725061760dd"
] ,
[
"a3ee39814135cad2"
] ,
[
"74a51ad373778ee6"
] ,
[
"104b71d90f13b9fa"
] ,
[
"07c0971dd23dd62d"
]
]
} ,
{
"id" : "03f134a19d11f009" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Webhook Response" ,
"links" : [
"496beddfeba0baee"
] ,
"x" : 245 ,
"y" : 60 ,
"wires" : [
[
"c46892d6233c5391" ,
"8a0b93500015be22"
]
]
} ,
{
"id" : "0e717f858b8d799c" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Update" ,
"func" : "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.update\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Eventsub Demo\",\n \"language\": \"fr\",\n \"category_id\": \"99999\",\n \"category_name\": \"Node-RED\",\n \"is_mature\": false\n }\n}\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 300 ,
"y" : 100 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "bd60cc12bad786d6" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 100 ,
"wires" : [
[
"0e717f858b8d799c"
]
]
} ,
{
"id" : "d1c64ebc8a5feec9" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Channel Update OUT" ,
"links" : [
"3c5392d536a6758c"
] ,
"x" : 685 ,
"y" : 100 ,
"wires" : [ ]
} ,
{
"id" : "099c35a256887f74" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Follower OUT" ,
"links" : [
"e3fdefc8024d75a1" ,
"bfade4f4c4470fca"
] ,
"x" : 685 ,
"y" : 140 ,
"wires" : [ ]
} ,
{
"id" : "35d2b6f068729230" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Subscriber OUT" ,
"links" : [
"46a3a69959ede421" ,
"f29e0798f7657a80" ,
"56eb628ad3cecd79" ,
"e48379b1b04cd476" ,
"31c0814baa995486"
] ,
"x" : 685 ,
"y" : 180 ,
"wires" : [ ]
} ,
{
"id" : "9f4b9459d55f954b" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 140 ,
"wires" : [
[
"fee40a11987375da"
]
]
} ,
{
"id" : "d6b5f07cf744a7b2" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 180 ,
"wires" : [
[
"4b779b18cfa18def"
]
]
} ,
{
"id" : "66db194703a62045" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : " SubGift OUT" ,
"links" : [
"bc942504e9d6822a"
] ,
"x" : 685 ,
"y" : 220 ,
"wires" : [ ]
} ,
{
"id" : "789b0a1d5d87ac36" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 220 ,
"wires" : [
[
"74325974cbdc5c90"
]
]
} ,
{
"id" : "74325974cbdc5c90" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake SubGift" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscription.gift\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"total\": 2,\n \"tier\": \"1000\",\n \"cumulative_total\": 284, //null if anonymous or not shared by the user\n \"is_anonymous\": false\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 300 ,
"y" : 220 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "353f3049743bafc3" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 300 ,
"wires" : [
[
"85deb0b591c10ce6"
]
]
} ,
{
"id" : "85deb0b591c10ce6" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Bits" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.cheer\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"is_anonymous\": false,\n \"user_id\": \"1234\", // null if is_anonymous=true\n \"user_login\": \"ioodyme\", // null if is_anonymous=true\n \"user_name\": \"ioodyme\", // null if is_anonymous=true\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"message\": \"pogchamp\",\n \"bits\": 1000\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 290 ,
"y" : 300 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "e1ed82cfe4ac1c7b" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : " Bits OUT" ,
"links" : [
"674ee05d36a01381" ,
"58ca90d863d4dc52" ,
"f5cefdde5937b428"
] ,
"x" : 685 ,
"y" : 300 ,
"wires" : [ ]
} ,
{
"id" : "dd04e54715766887" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 260 ,
"wires" : [
[
"a69ac429f7a89027"
]
]
} ,
{
"id" : "a69ac429f7a89027" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Sub Message" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscription.message\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"tier\": \"1000\",\n \"message\": {\n \"text\": \"Love the stream! FevziGG\",\n \"emotes\": [\n {\n \"begin\": 23,\n \"end\": 30,\n \"id\": \"302976485\"\n }\n ]\n },\n \"cumulative_months\": 15,\n \"streak_months\": 1, // null if not shared\n \"duration_months\": 6\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 320 ,
"y" : 260 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "7008cac6ebd21511" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "SubMessage OUT" ,
"links" : [
"f436b7331bd9609b"
] ,
"x" : 685 ,
"y" : 260 ,
"wires" : [ ]
} ,
{
"id" : "4f3290f9114221db" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 340 ,
"wires" : [
[
"442489b5937e9783"
]
]
} ,
{
"id" : "442489b5937e9783" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Raid" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.raid\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"to_broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"from_broadcaster_user_id\": \"1234\",\n \"from_broadcaster_user_login\": \"ioodyme\",\n \"from_broadcaster_user_name\": \"ioodyme\",\n \"to_broadcaster_user_id\": \"564492369\",\n \"to_broadcaster_user_login\": \"ioodyme\",\n \"to_broadcaster_user_name\": \"ioodyme\",\n \"viewers\": 9001\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 300 ,
"y" : 340 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c46892d6233c5391"
]
]
} ,
{
"id" : "8e64834c2e4ab9c6" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : " Raid OUT" ,
"links" : [
"6c6457495d5b73d4" ,
"550ccd4012fa1fbf"
] ,
"x" : 685 ,
"y" : 340 ,
"wires" : [ ]
} ,
{
"id" : "14246c59203bf325" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 420 ,
"wires" : [
2021-08-26 16:24:14 +02:00
[
2022-02-18 13:13:10 +01:00
"f76ce5c449b39ec1"
]
]
} ,
{
"id" : "f76ce5c449b39ec1" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Unban" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.unban\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"moderator_user_id\": \"1339\",\n \"moderator_user_login\": \"mod_user\",\n \"moderator_user_name\": \"Mod_User\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 300 ,
"y" : 420 ,
"wires" : [
[
"c46892d6233c5391"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
]
} ,
{
"id" : "ec063c27cbdff5bc" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : " Unban OUT" ,
"links" : [
"e7138cd2dc73b8c0"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 685 ,
"y" : 420 ,
"wires" : [ ]
} ,
{
"id" : "fc172da139ae610c" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 380 ,
"wires" : [
[
"09ca04c0b1964ea9"
]
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "09ca04c0b1964ea9" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Ban" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.ban\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"moderator_user_id\": \"1339\",\n \"moderator_user_login\": \"mod_user\",\n \"moderator_user_name\": \"Mod_User\",\n \"reason\": \"Offensive language\",\n \"ends_at\": \"2020-07-15T18:16:11.17106713Z\",\n \"is_permanent\": false\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 290 ,
"y" : 380 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "3e4196fcfe60dd91" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Ban OUT" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"46a44352c8d66e56"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 685 ,
"y" : 380 ,
"wires" : [ ]
} ,
{
"id" : "904fead80acf0883" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 460 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"57835b0e8181dc56"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "57835b0e8181dc56" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Channel point" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.channel_points_custom_reward_redemption.add\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1234\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"user_id\": \"9001\",\n \"user_login\": \"cooler_user\",\n \"user_name\": \"Cooler_User\",\n \"user_input\": \"pogchamp\",\n \"status\": \"unfulfilled\",\n \"reward\": {\n \"id\": \"9001\",\n \"title\": \"title\",\n \"cost\": 100,\n \"prompt\": \"reward prompt\"\n },\n \"redeemed_at\": \"2020-07-15T17:16:03.17106713Z\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 320 ,
"y" : 460 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "b97c23ba88296b1b" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Channel point OUT" ,
"links" : [
"2720e13c28d5f2a6" ,
"855f17e48633f9cb" ,
"bfd5b37e82c754af" ,
"716dda6b2e195e16" ,
"9f9939bb1d5a3621" ,
"1b401f6940424d10" ,
"f11751938967bc06" ,
"d0b826a68fb7648f"
] ,
"x" : 685 ,
"y" : 460 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "b4c1b467be768e4a" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 580 ,
"wires" : [
[
"76a3218918c97560"
]
]
} ,
{
"id" : "76a3218918c97560" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Poll end" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’ t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Blue\", \"bits_votes\": 50, \"channel_points_votes\": 70, \"votes\": 120},\n {\"id\": \"124\", \"title\": \"Yellow\", \"bits_votes\": 100, \"channel_points_votes\": 40, \"votes\": 140},\n {\"id\": \"125\", \"title\": \"Green\", \"bits_votes\": 10, \"channel_points_votes\": 70, \"votes\": 80}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"status\": \"completed\",\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 310 ,
"y" : 580 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c46892d6233c5391"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "90d9f9f778dfea84" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Poll End OUT" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"440ca17ff1420dfe"
] ,
"x" : 685 ,
"y" : 580 ,
"wires" : [ ]
} ,
{
"id" : "1b82f3fefef1c56c" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 500 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"427e0239f95d69ba"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "427e0239f95d69ba" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Poll Begin" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’ t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Yeah!\"},\n {\"id\": \"124\", \"title\": \"No!\"},\n {\"id\": \"125\", \"title\": \"Maybe!\"}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ends_at\": \"2020-07-15T17:16:08.17106713Z\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 310 ,
"y" : 500 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c46892d6233c5391"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "f71de6f3f45ab546" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Poll Begin OUT" ,
"mode" : "link" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"c977fc48940eaa1f"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 685 ,
"y" : 500 ,
"wires" : [ ]
} ,
{
"id" : "aafeca1840745c1a" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 620 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"641360867f4299e0"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "641360867f4299e0" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Prediction Begin" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’ t shoes just really hard socks?\",\n \"outcomes\": [\n {\"id\": \"1243456\", \"title\": \"Yeah!\", \"color\": \"blue\"},\n {\"id\": \"2243456\", \"title\": \"No!\", \"color\": \"pink\"},\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"locks_at\": \"2020-07-15T17:21:03.17106713Z\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 330 ,
"y" : 620 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c46892d6233c5391"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "956b7e15e56e3e6e" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : " Prediction Begin OUT" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"02eff79de54243df"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 685 ,
"y" : 620 ,
"wires" : [ ]
} ,
{
"id" : "2557738c1c37389e" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 740 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"976a5ddd48218c96"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "976a5ddd48218c96" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake HypeTrain Begin" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"total\": 137,\n \"progress\": 137,\n \"goal\": 500,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"last_contribution\": { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"expires_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 330 ,
"y" : 740 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "aa03c725061760dd" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "HypeTrain Begin OUT" ,
"links" : [
"3445992ddf31cb4e"
] ,
"x" : 685 ,
"y" : 740 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c936ce23cdc37428" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 700 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"7cb22ecd302d5fe5"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "7cb22ecd302d5fe5" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Fake Prediction End" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’ t shoes just really hard socks?\",\n \"winning_outcome_id\": \"12345\",\n \"outcomes\": [\n {\n \"id\": \"12345\",\n \"title\": \"Yeah!\",\n \"color\": \"blue\", // can be blue or pink\n \"users\": 2,\n \"channel_points\": 15000,\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cool_User\",\n \"user_login\": \"cool_user\",\n \"user_id\": \"1234\",\n \"channel_points_won\": 10000,\n \"channel_points_used\": 500\n },\n {\n \"user_name\": \"Coolest_User\",\n \"user_login\": \"coolest_user\",\n \"user_id\": \"1236\",\n \"channel_points_won\": 5000,\n \"channel_points_used\": 100\n },\n ]\n },\n {\n \"id\": \"22435\",\n \"title\": \"No!\",\n \"users\": 2,\n \"channel_points\": 200,\n \"color\": \"pink\",\n \"top_predictors\": [\n {\n \"user_name\": \"Cooler_User\",\n \"user_login\": \"cooler_user\",\n \"user_id\": 12345,\n \"channel_points_won\": null, // null if result is refund or loss\n \"channel_points_used\": 100\n },\n {\n \"user_name\": \"Elite_User\",\n \"user_login\": \"elite_user\",\n \"user_id\": 1337,\n \"channel_points_won\": null, // null if result is refund or loss\n \"channel_points_used\": 100\n }\n ]\n }\n ],\n \"status\": \"resolved\", // valid values: resolved, canceled\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 330 ,
2022-02-18 13:13:10 +01:00
"y" : 700 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "8b358c8a79eba44f" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Prediction End OUT" ,
"links" : [
"d8842a92a68f0e27"
] ,
"x" : 685 ,
"y" : 700 ,
"wires" : [ ]
} ,
{
"id" : "e2e09ba8297e6c08" ,
"type" : "inject" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
2021-08-26 16:24:14 +02:00
{
2022-02-18 13:13:10 +01:00
"p" : "payload"
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"p" : "topic" ,
2021-08-26 16:24:14 +02:00
"vt" : "str"
}
] ,
2022-02-18 13:13:10 +01:00
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
"x" : 130 ,
"y" : 820 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"91a14548331e78ff"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "91a14548331e78ff" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Fake HypeTrain End" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"level\": 2,\n \"total\": 137,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\",\n \"cooldown_ends_at\": \"2020-07-15T18:16:11.17106713Z\"\n }\n}\n\nreturn msg;" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 330 ,
2022-02-18 13:13:10 +01:00
"y" : 820 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "74a51ad373778ee6" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "HypeTrain End OUT" ,
"links" : [
"c22851c0379367b6"
] ,
"x" : 685 ,
"y" : 820 ,
"wires" : [ ]
} ,
{
"id" : "cb0ba07aa871111a" ,
2021-08-26 16:24:14 +02:00
"type" : "inject" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
2022-02-18 13:13:10 +01:00
"x" : 130 ,
"y" : 860 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e8239ae110070f53"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e8239ae110070f53" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Fake Stream Online" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"stream.online\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"9001\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"type\": \"live\",\n \"started_at\": \"2020-10-11T10:11:12.123Z\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 330 ,
"y" : 860 ,
"wires" : [
[
"c46892d6233c5391"
]
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "104b71d90f13b9fa" ,
2021-08-26 16:24:14 +02:00
"type" : "link out" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Stream Online OUT" ,
"mode" : "link" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"97fecabe81f273fd"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 685 ,
"y" : 860 ,
"wires" : [ ]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "3b489bf1f69ab04e" ,
2021-08-26 16:24:14 +02:00
"type" : "inject" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
2022-02-18 13:13:10 +01:00
"x" : 130 ,
"y" : 780 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e158862b2ad9e355"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e158862b2ad9e355" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Fake HypeTrainProgress" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"level\": 2,\n \"total\": 700,\n \"progress\": 200,\n \"goal\": 1000,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"last_contribution\": { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"expires_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 340 ,
"y" : 780 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c46892d6233c5391"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "a3ee39814135cad2" ,
2021-08-26 16:24:14 +02:00
"type" : "link out" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "HypeTrain Progress OUT" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"1d7fb21bf35a91b8"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 685 ,
"y" : 780 ,
"wires" : [ ]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "4309ad73534e365c" ,
2021-08-26 16:24:14 +02:00
"type" : "inject" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
2022-02-18 13:13:10 +01:00
"x" : 130 ,
"y" : 900 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"2e435c1be18bebf7"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "2e435c1be18bebf7" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Fake Stream Offline" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"stream.offline\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\",\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n }\n },\n \"event\": {\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\"\n }\n}\n\nreturn msg;" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 330 ,
2022-02-18 13:13:10 +01:00
"y" : 900 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "07c0971dd23dd62d" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Stream Offline OUT" ,
"mode" : "link" ,
"links" : [
"63c02972795b5176"
] ,
"x" : 685 ,
"y" : 900 ,
"wires" : [ ]
} ,
{
"id" : "59dac292ac05e5d8" ,
2021-08-26 16:24:14 +02:00
"type" : "inject" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
2022-02-18 13:13:10 +01:00
"x" : 130 ,
"y" : 540 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"9cae1c4a7541c723"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "9cae1c4a7541c723" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Fake Poll Progress" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’ t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Yeah!\", \"bits_votes\": 5, \"channel_points_votes\": 7, \"votes\": 12},\n {\"id\": \"124\", \"title\": \"No!\", \"bits_votes\": 10, \"channel_points_votes\": 4, \"votes\": 14},\n {\"id\": \"125\", \"title\": \"Maybe!\", \"bits_votes\": 0, \"channel_points_votes\": 7, \"votes\": 7}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ends_at\": \"2020-07-15T17:16:08.17106713Z\"\n }\n}\n\nreturn msg;" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 320 ,
2022-02-18 13:13:10 +01:00
"y" : 540 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "52f26835eeca107c" ,
2021-08-26 16:24:14 +02:00
"type" : "link out" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
2022-02-18 13:13:10 +01:00
"name" : "Poll Progress OUT" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"013eac261f7f830a"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 685 ,
"y" : 540 ,
"wires" : [ ]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "03c5d3303b39046e" ,
"type" : "link out" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Prediction Progress OUT" ,
"links" : [
"58059205d3b59963"
] ,
"x" : 685 ,
"y" : 660 ,
"wires" : [ ]
} ,
{
"id" : "8fe676f729352bd3" ,
2021-08-26 16:24:14 +02:00
"type" : "inject" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
2021-08-26 16:24:14 +02:00
"g" : "1d9e4b26a824022f" ,
"name" : "Inject" ,
"props" : [
{
"p" : "payload"
} ,
{
"p" : "topic" ,
"vt" : "str"
}
] ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : 0.1 ,
"topic" : "" ,
"payloadType" : "date" ,
2022-02-18 13:13:10 +01:00
"x" : 130 ,
"y" : 660 ,
"wires" : [
[
"870a89265d2adf1d"
]
]
} ,
{
"id" : "870a89265d2adf1d" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "Fake Prediction progress" ,
"func" : "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’ t shoes just really hard socks?\",\n \"outcomes\": [\n {\n \"id\": \"1243456\",\n \"title\": \"Yeah!\",\n \"color\": \"blue\",\n \"users\": 10,\n \"channel_points\": 15000,\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cool_User\",\n \"user_login\": \"cool_user\",\n \"user_id\": \"1234\",\n \"channel_points_won\": null,\n \"channel_points_used\": 500\n },\n {\n \"user_name\": \"Coolest_User\",\n \"user_login\": \"coolest_user\",\n \"user_id\": \"1236\",\n \"channel_points_won\": null,\n \"channel_points_used\": 200\n }\n ]\n },\n {\n \"id\": \"2243456\",\n \"title\": \"No!\",\n \"color\": \"pink\",\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cooler_User\",\n \"user_login\": \"cooler_user\",\n \"user_id\": 12345,\n \"channel_points_won\": null,\n \"channel_points_used\": 5000\n }\n ]\n },\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"locks_at\": \"2020-07-15T17:21:03.17106713Z\"\n }\n}\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 340 ,
"y" : 660 ,
"wires" : [
[
"c46892d6233c5391"
]
]
} ,
{
"id" : "8a0b93500015be22" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "1d9e4b26a824022f" ,
"name" : "" ,
"active" : false ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "payload" ,
"targetType" : "msg" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 530 ,
"y" : 60 ,
"wires" : [ ]
} ,
{
"id" : "7098c94cefad6f46" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Channel Update" ,
"func" : "const broadcaster = msg.payload.event.broadcaster_user_name;\nconst title = msg.payload.event.title;\nconst category = msg.payload.event.category_name;\n\nreturn [{payload: broadcaster}, {payload : title}, {payload : category}];" ,
"outputs" : 3 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 920 ,
"y" : 70 ,
"wires" : [
[
"d8d1f2dfc5c946e8"
] ,
[
"d8d1f2dfc5c946e8"
] ,
[
"d8d1f2dfc5c946e8"
]
] ,
"outputLabels" : [
"Broadcaster" ,
"Title" ,
"Category"
]
} ,
{
"id" : "3c5392d536a6758c" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Channel Update" ,
"links" : [
"d1c64ebc8a5feec9"
] ,
"x" : 795 ,
"y" : 70 ,
"wires" : [
[
"7098c94cefad6f46"
]
]
} ,
{
"id" : "d8d1f2dfc5c946e8" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 70 ,
"wires" : [ ]
} ,
{
"id" : "e3fdefc8024d75a1" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Follower" ,
"links" : [
"099c35a256887f74"
] ,
"x" : 795 ,
"y" : 120 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"781d8b6ea144560b"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "781d8b6ea144560b" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Follower" ,
"func" : "const username = msg.payload.event.user_name;\n\nreturn [{payload : username}];" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 900 ,
"y" : 120 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"44c07fb9fc35c75c"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Follower Username"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "46a3a69959ede421" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Subscriber" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"35d2b6f068729230"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 160 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"0706fa919a2b66b7"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "0706fa919a2b66b7" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Subscriber" ,
"func" : "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\n\nreturn [{payload : username}, {payload : tier}];\n" ,
"outputs" : 2 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 910 ,
"y" : 160 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"13aa39ce93155d90"
] ,
[
"13aa39ce93155d90"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Subscriber Username" ,
"Tier"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "13aa39ce93155d90" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 160 ,
"wires" : [ ]
} ,
{
"id" : "22b9bd03717a6092" ,
"type" : "function" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "SubGift" ,
"func" : "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\n\nreturn [{payload : username}, {payload : tier}];\n" ,
"outputs" : 2 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
"x" : 900 ,
"y" : 200 ,
"wires" : [
[
"c9bd7b1cdbdaca88"
] ,
[
"c9bd7b1cdbdaca88"
]
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"outputLabels" : [
"Subscriber Username" ,
"Tier"
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "bc942504e9d6822a" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "SubGift" ,
"links" : [
"66db194703a62045"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 200 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"22b9bd03717a6092"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c9bd7b1cdbdaca88" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 200 ,
"wires" : [ ]
} ,
{
"id" : "2e12e6b6e53b0967" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Sub Mesage" ,
"func" : "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\nconst message = msg.payload.event.message.text;\n\nreturn [{payload : username}, {payload : tier}, {payload : message}];" ,
"outputs" : 3 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 910 ,
"y" : 250 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c4cd0c41321ef3bd"
] ,
[
"c4cd0c41321ef3bd"
] ,
[
"c4cd0c41321ef3bd"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Subscriber Username" ,
"Tier" ,
"Message"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "f436b7331bd9609b" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Sub Message" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"7008cac6ebd21511"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 250 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"2e12e6b6e53b0967"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c4cd0c41321ef3bd" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 250 ,
"wires" : [ ]
} ,
{
"id" : "4c49467a35df9851" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Bits" ,
"func" : "const username = msg.payload.event.user_name;\nconst bits = msg.payload.event.bits;\nconst message = msg.payload.event.message;\n\nreturn [{payload : username}, {payload : bits}, {payload : message}];" ,
"outputs" : 3 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 890 ,
"y" : 310 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ca9267f59495a61e"
] ,
[
"ca9267f59495a61e"
] ,
[
"ca9267f59495a61e"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Username" ,
"Bits" ,
"Message"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "674ee05d36a01381" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Bits" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"e1ed82cfe4ac1c7b"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 310 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"4c49467a35df9851"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "ca9267f59495a61e" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 310 ,
"wires" : [ ]
} ,
{
"id" : "c282f7bbe2ea94a6" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Raid" ,
"func" : "const username = msg.payload.event.from_broadcaster_user_name;\nconst viewers = msg.payload.event.viewers;\n\nreturn[{payload : username}, {payload : viewers}];" ,
"outputs" : 2 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 890 ,
"y" : 360 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"0e8b1da7d78d9e04"
] ,
[
"0e8b1da7d78d9e04"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Broadcaster Username" ,
"Viewers"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "6c6457495d5b73d4" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Raid" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"8e64834c2e4ab9c6"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 360 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"c282f7bbe2ea94a6"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "0e8b1da7d78d9e04" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 360 ,
"wires" : [ ]
} ,
{
"id" : "216bb963f207e682" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Ban" ,
"func" : "const username = msg.payload.event.user_name;\nconst moderator = msg.payload.event.moderator_user_name;\nconst reason = msg.payload.event.reason;\nconst end = msg.payload.event.ends_at;\nconst permanent = msg.payload.event.is_permanent;\n\nreturn [{payload : username},{payload : moderator},{payload : reason}, {payload : end},{payload : permanent}];" ,
"outputs" : 5 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 890 ,
"y" : 420 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"d1e21ddc83cc908f"
] ,
[
"d1e21ddc83cc908f"
] ,
[
"d1e21ddc83cc908f"
] ,
[
"d1e21ddc83cc908f"
] ,
[
"d1e21ddc83cc908f"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Banned User" ,
"Moderator" ,
"Reason" ,
"End date" ,
"Permanent"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "46a44352c8d66e56" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Ban" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"3e4196fcfe60dd91"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 420 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"216bb963f207e682"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "d1e21ddc83cc908f" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 420 ,
"wires" : [ ]
} ,
{
"id" : "b7796720760df4ca" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Unban" ,
"func" : "const username = msg.payload.event.user_name;\nconst moderator = msg.payload.event.moderator_user_name;\n\nreturn [{payload : username}, {payload : moderator}];" ,
"outputs" : 2 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 890 ,
"y" : 480 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"2a80b4bcb77e25b1"
] ,
[
"2a80b4bcb77e25b1"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Banned User" ,
"Moderator"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e7138cd2dc73b8c0" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Unban" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"ec063c27cbdff5bc"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 480 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"b7796720760df4ca"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "2a80b4bcb77e25b1" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 480 ,
"wires" : [ ]
} ,
{
"id" : "3ee0a398d56ce81b" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Channel Point" ,
"func" : "const username = msg.payload.event.user_name;\nconst message = msg.payload.event.user_input;\nconst title = msg.payload.event.reward.title;\nconst prompt = msg.payload.event.reward.prompt;\nconst cost = msg.payload.event.reward.cost;\n\nreturn [{payload : username}, {payload : message}, {payload : title}, {payload : prompt}, {payload : cost}];" ,
"outputs" : 5 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 920 ,
"y" : 540 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"bb15db95da85594b"
] ,
[
"bb15db95da85594b"
] ,
[
"bb15db95da85594b"
] ,
[
"bb15db95da85594b"
] ,
[
"bb15db95da85594b"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Username" ,
"Message" ,
"Title" ,
"Prompt" ,
"Cost"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "2720e13c28d5f2a6" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Channel Points" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"b97c23ba88296b1b"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 540 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"3ee0a398d56ce81b"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "bb15db95da85594b" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 540 ,
"wires" : [ ]
} ,
{
"id" : "f23b95398eaa0fb5" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Poll Begin" ,
"func" : "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\nconst end = msg.payload.event.ends_at;\n\nreturn [{payload : title}, {payload : choices}, {payload : end}];" ,
"outputs" : 3 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 900 ,
"y" : 610 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"0a6403e990465b45"
] ,
[
"0a6403e990465b45"
] ,
[
"0a6403e990465b45"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Title" ,
"Choices" ,
"End"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c977fc48940eaa1f" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Poll Begin" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"f71de6f3f45ab546"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 610 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"f23b95398eaa0fb5"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "0a6403e990465b45" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 610 ,
"wires" : [ ]
} ,
{
"id" : "e66321b5eebb9e62" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Poll Progress" ,
"func" : "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\nconst end = msg.payload.event.ends_at;\n\nreturn [{payload : title}, {payload : choices}, {payload : end}];" ,
"outputs" : 3 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 910 ,
"y" : 660 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"82982a94bf2f96e5"
] ,
[
"82982a94bf2f96e5"
] ,
[
"82982a94bf2f96e5"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Title" ,
"Choices" ,
"End"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "013eac261f7f830a" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Poll Progress" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"52f26835eeca107c"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 660 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e66321b5eebb9e62"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "82982a94bf2f96e5" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 660 ,
"wires" : [ ]
} ,
{
"id" : "7822bd853ff32202" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Poll End" ,
"func" : "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\n\nreturn [{payload : title}, {payload : choices}];" ,
"outputs" : 2 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 900 ,
"y" : 710 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"e3a2b757bc7b4f00"
] ,
[
"e3a2b757bc7b4f00"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Title" ,
"Choices"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "440ca17ff1420dfe" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Poll End" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"90d9f9f778dfea84"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 710 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"7822bd853ff32202"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "e3a2b757bc7b4f00" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 710 ,
"wires" : [ ]
} ,
{
"id" : "bf777e01107c8dad" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Prediction Begin" ,
"func" : "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\nconst end = msg.payload.event.locks_at;\n\nreturn [{payload : title}, {payload : outcomes}, {payload : end}];" ,
"outputs" : 3 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 920 ,
"y" : 760 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"cf8eb778297937fe"
] ,
[
"cf8eb778297937fe"
] ,
[
"cf8eb778297937fe"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Title" ,
"Outcomes" ,
"End"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "02eff79de54243df" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Prediction Begin" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"956b7e15e56e3e6e"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 760 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"bf777e01107c8dad"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "cf8eb778297937fe" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 770 ,
"wires" : [ ]
} ,
{
"id" : "31b7edc241da122b" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Prediction Progress" ,
"func" : "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\nconst end = msg.payload.event.locks_at;\n\nreturn [{payload : title}, {payload : outcomes}, {payload : end}];" ,
"outputs" : 3 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 930 ,
"y" : 820 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"d3ae76bd5a99fe61"
] ,
[
"d3ae76bd5a99fe61"
] ,
[
"d3ae76bd5a99fe61"
2021-08-26 16:24:14 +02:00
]
2022-02-18 13:13:10 +01:00
] ,
"outputLabels" : [
"Title" ,
"Outcomes" ,
"End"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "58059205d3b59963" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Prediction Progress" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"03c5d3303b39046e"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 820 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"31b7edc241da122b"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "d3ae76bd5a99fe61" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1110 ,
"y" : 820 ,
"wires" : [ ]
} ,
{
"id" : "4ce638dd76c24bdb" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Prediction End" ,
"func" : "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\n\nreturn [{payload : title}, {payload : outcomes}];" ,
"outputs" : 2 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 920 ,
"y" : 870 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"9438739a0d42032a"
] ,
[
"9438739a0d42032a"
2021-08-26 16:24:14 +02:00
]
] ,
2022-02-18 13:13:10 +01:00
"outputLabels" : [
"Title" ,
"Outcomes"
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "d8842a92a68f0e27" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Prediction End" ,
"links" : [
"8b358c8a79eba44f"
] ,
"x" : 795 ,
"y" : 870 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"4ce638dd76c24bdb"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "9438739a0d42032a" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 870 ,
"wires" : [ ]
} ,
{
"id" : "ba962cb706960ca3" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "HypeTrain Begin" ,
"func" : "const total = msg.payload.event.total;\nconst progress = msg.payload.event.progress;\nconst goal = msg.payload.event.goal;\nconst top_contrib = msg.payload.event.top_contributions;\nconst last_contrib = msg.payload.event.last_contribution;\n\nreturn [{payload : total}, {payload : progress}, {payload : goal}, {payload : top_contrib}, {payload : last_contrib}];" ,
"outputs" : 5 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 930 ,
"y" : 930 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"bcf41039c5488aa0"
] ,
[
"bcf41039c5488aa0"
] ,
[
"bcf41039c5488aa0"
] ,
[
"bcf41039c5488aa0"
] ,
[
"bcf41039c5488aa0"
2021-08-26 16:24:14 +02:00
]
] ,
2022-02-18 13:13:10 +01:00
"outputLabels" : [
"Total" ,
"Progress" ,
"Goal" ,
"Top contrib" ,
"Last contrib"
]
2021-08-26 16:24:14 +02:00
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "3445992ddf31cb4e" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "HypeTrain Begin" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"aa03c725061760dd"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 930 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"ba962cb706960ca3"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "bcf41039c5488aa0" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1120 ,
"y" : 930 ,
"wires" : [ ]
} ,
{
"id" : "2082c62be84dcf16" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "HypeTrain Progress" ,
"func" : "const level = msg.payload.event.level;\nconst total = msg.payload.event.total;\nconst progress = msg.payload.event.progress;\nconst goal = msg.payload.event.goal;\nconst top_contrib = msg.payload.event.top_contributions;\nconst last_contrib = msg.payload.event.last_contribution;\n\nreturn [{payload : level}, {payload : total}, {payload : progress}, {payload : goal}, {payload : top_contrib}, {payload : last_contrib}];" ,
"outputs" : 6 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 940 ,
"y" : 1020 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"9f32750213a4f0c6"
] ,
[
"9f32750213a4f0c6"
] ,
[
"9f32750213a4f0c6"
] ,
[
"9f32750213a4f0c6"
] ,
[
"9f32750213a4f0c6"
] ,
[
"9f32750213a4f0c6"
]
] ,
"outputLabels" : [
"Level" ,
"Total" ,
"Progress" ,
"Goal" ,
"Top contrib" ,
"Last contrib"
]
} ,
{
"id" : "1d7fb21bf35a91b8" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "HypeTrain Progress" ,
"links" : [
"a3ee39814135cad2"
] ,
"x" : 795 ,
"y" : 1020 ,
"wires" : [
[
"2082c62be84dcf16"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "9f32750213a4f0c6" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1150 ,
"y" : 1020 ,
"wires" : [ ]
} ,
{
"id" : "65537eb9b8bb35b8" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "HyperTrain End" ,
"func" : "const level = msg.payload.event.level;\nconst total = msg.payload.event.total;\nconst top_contrib = msg.payload.event.top_contributions;\n\nreturn [{payload : level}, {payload : total}, {payload : top_contrib}];" ,
"outputs" : 3 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 920 ,
"y" : 1100 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"df791e577307e9f7"
] ,
[
"df791e577307e9f7"
2021-08-26 16:24:14 +02:00
] ,
[
2022-02-18 13:13:10 +01:00
"df791e577307e9f7"
2021-08-26 16:24:14 +02:00
]
] ,
"outputLabels" : [
2022-02-18 13:13:10 +01:00
"Level" ,
"Total" ,
"Top contrib"
2021-08-26 16:24:14 +02:00
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "c22851c0379367b6" ,
2021-08-26 16:24:14 +02:00
"type" : "link in" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "HypeTrain End" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"74a51ad373778ee6"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 1100 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"65537eb9b8bb35b8"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "df791e577307e9f7" ,
2021-08-26 16:24:14 +02:00
"type" : "debug" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
2022-02-18 13:13:10 +01:00
"x" : 1120 ,
"y" : 1100 ,
"wires" : [ ]
} ,
{
"id" : "44c07fb9fc35c75c" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1100 ,
"y" : 120 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "b30cfc59e8cbe783" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Stream Online" ,
"func" : "const broadcaster = msg.payload.event.broadcaster_user_login;\nconst type = msg.payload.event.type;\n\nreturn [{ payload: broadcaster }, { payload: type }];" ,
"outputs" : 2 ,
2021-08-26 16:24:14 +02:00
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 920 ,
"y" : 1150 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"4f2895be0123f5f4"
] ,
[
"4f2895be0123f5f4"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "97fecabe81f273fd" ,
2021-08-26 16:24:14 +02:00
"type" : "link in" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Stream Online" ,
2021-08-26 16:24:14 +02:00
"links" : [
2022-02-18 13:13:10 +01:00
"104b71d90f13b9fa"
2021-08-26 16:24:14 +02:00
] ,
2022-02-18 13:13:10 +01:00
"x" : 795 ,
"y" : 1150 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"b30cfc59e8cbe783"
2021-08-26 16:24:14 +02:00
]
]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "4f2895be0123f5f4" ,
2021-08-26 16:24:14 +02:00
"type" : "debug" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
2021-08-26 16:24:14 +02:00
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
2022-02-18 13:13:10 +01:00
"x" : 1120 ,
"y" : 1150 ,
2021-08-26 16:24:14 +02:00
"wires" : [ ]
} ,
{
2022-02-18 13:13:10 +01:00
"id" : "63c02972795b5176" ,
"type" : "link in" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Stream Offline" ,
"links" : [
"07c0971dd23dd62d"
] ,
"x" : 795 ,
"y" : 1200 ,
"wires" : [
[
"e3d6d7b46a2d2955"
]
]
} ,
{
"id" : "e3d6d7b46a2d2955" ,
2021-08-26 16:24:14 +02:00
"type" : "function" ,
2022-02-18 13:13:10 +01:00
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "Stream Offline" ,
"func" : "const broadcaster = msg.payload.event.broadcaster_user_login;\n\nreturn [{ payload: broadcaster }];" ,
2021-08-26 16:24:14 +02:00
"outputs" : 1 ,
"noerr" : 0 ,
"initialize" : "" ,
"finalize" : "" ,
"libs" : [ ] ,
2022-02-18 13:13:10 +01:00
"x" : 920 ,
"y" : 1200 ,
2021-08-26 16:24:14 +02:00
"wires" : [
[
2022-02-18 13:13:10 +01:00
"aa6229c18fc2ac6d"
2021-08-26 16:24:14 +02:00
]
]
2022-02-18 13:13:10 +01:00
} ,
{
"id" : "aa6229c18fc2ac6d" ,
"type" : "debug" ,
"z" : "bedf5b9469855c83" ,
"g" : "c3a384b88e4aae92" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"statusVal" : "" ,
"statusType" : "auto" ,
"x" : 1120 ,
"y" : 1200 ,
"wires" : [ ]
2021-08-26 16:24:14 +02:00
}
2021-08-27 15:05:37 +02:00
]