Created
July 30, 2014 14:06
-
-
Save friej715/e66438ea306956c7b717 to your computer and use it in GitHub Desktop.
Super-simple streamtools pattern to send a Yo to all subscribers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Blocks":[ | |
{ | |
"Id":"23", | |
"Type":"webRequest", | |
"Rule":{ | |
"BodyPath":".", | |
"Headers":{ | |
"Content-Type":"application/json;odata=verbose" | |
}, | |
"Method":"POST", | |
"Url":"http://api.justyo.co/yoall/", | |
"UrlPath":"" | |
}, | |
"Position":{ | |
"X":439, | |
"Y":379 | |
} | |
}, | |
{ | |
"Id":"36", | |
"Type":"map", | |
"Rule":{ | |
"Additive":false, | |
"Map":{ | |
"api_token":"'YOUR_API_TOKEN'" | |
} | |
}, | |
"Position":{ | |
"X":412, | |
"Y":288 | |
} | |
}, | |
{ | |
"Id":"33", | |
"Type":"bang", | |
"Rule":null, | |
"Position":{ | |
"X":358, | |
"Y":200 | |
} | |
}, | |
{ | |
"Id":"21", | |
"Type":"tolog", | |
"Rule":null, | |
"Position":{ | |
"X":480, | |
"Y":468 | |
} | |
} | |
], | |
"Connections":[ | |
{ | |
"Id":"26", | |
"FromId":"23", | |
"ToId":"21", | |
"ToRoute":"in" | |
}, | |
{ | |
"Id":"37", | |
"FromId":"33", | |
"ToId":"36", | |
"ToRoute":"in" | |
}, | |
{ | |
"Id":"38", | |
"FromId":"36", | |
"ToId":"23", | |
"ToRoute":"in" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should work for an individual username, too; just add
"username": "'USERNAME'"
to your Map block (in addition to the API token) and swap/yoall/
for/yo/
.Also, looks like Yos are limited to one Yo per user per minute.