Created
August 19, 2014 16:22
-
-
Save edsykes/f8e309a06e21b7d63965 to your computer and use it in GitHub Desktop.
quantified dev api using curl.
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
stream=$(curl -x localhost:8888 -X POST http://app.quantifieddev.org/stream) | |
id=$(echo $stream | sed 's_.*"streamid": "\([^"]*\)".*_\1_') | |
read=$(echo $stream | sed 's_.*"readToken": "\([^"]*\)".*_\1_') | |
write=$(echo $stream | sed 's_.*"writeToken": "\([^"]*\)".*_\1_') | |
curl -k -x localhost:8888 -X POST -H Content-Type:application/json -H Authorization:$write -H Cache-Control:no-cache -d '{ "dateTime": "2014-03-31T15:28:36.1788806Z", "location": { "lat": 52.5203, "long": 0.8567 }, "actionTags": [ "Build", "Start" ], "objectTags": [ "Computer", "Software" ], "properties": { "Language": "C#", "Environment": "VisualStudio2012" } }' http://app.quantifieddev.org/stream/$id/event | |
echo register this stream at http://app.quantifieddev.org/dashboard?streamId=$id\&readToken=$read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment