Skip to content

Commit

Permalink
Keen poster
Browse files Browse the repository at this point in the history
  • Loading branch information
Myles Byrne committed Sep 18, 2014
1 parent ae5b937 commit 105e05b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions post-to-keen
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

PROJECT_ID=$1
EVENT_COLLECTION=$2
WRITE_KEY=$3

curl \
-s \
"https://api.keen.io/3.0/projects/$PROJECT_ID/events/$EVENT_COLLECTION?api_key=$WRITE_KEY" \
-H "Content-Type: application/json" \
-d @-

echo
13 changes: 13 additions & 0 deletions test/post-to-keen
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e

# ensure we're in the parent directory of this file
cd $(dirname $0)/..

# sherif's credentials, be nice
project_id='53d1e3cfce5e4372dd000005'
event_collection='test-collection'
write_key='8bebb176662f6d4604473f0de272b83deacc38261dbbf7f3f81f69e512bab2fece374afd027ebe91130232263a676e8d014a2947795f65951ff3e5cf42e6a0368a57a03a17c0639a5e94e43cca6a73c1b7ab39e5b54fc7a374203eafe1cf370e4a96cf9b264fa30270f2bd39ec691541'

echo '{ "hi": "there" }' | ./post-to-keen $project_id $event_collection $write_key

0 comments on commit 105e05b

Please sign in to comment.