Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
post a message to a campfire room
@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