Skip to content

Instantly share code, notes, and snippets.

@gsherman
Created September 19, 2014 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsherman/bd3a736b317104f8e6de to your computer and use it in GitHub Desktop.
Save gsherman/bd3a736b317104f8e6de to your computer and use it in GitHub Desktop.
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