post a message to a campfire room
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
@echo off | |
set Count=0 | |
for %%a in (%*) do set /a Count+=1 | |
echo %Count% | |
if %count% NEQ 2 goto usage | |
c: | |
cd C:\Dovetail\RuleManagerActions\campfire | |
SET room=%1 | |
SET token=mySecretTokenGoesHere | |
SET message='{ "message": { "body": %2 }}' | |
:sendMessage | |
curl -k -u %token%:X -H 'Content-Type: application/json' -d %message% https://ourCampfireAccount.campfirenow.com/room/%room%/speak.json | |
goto done | |
:usage | |
echo. | |
echo Invalid usage | |
echo Usage: campfire-message roomId message | |
echo. | |
:done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment