From e5158ce1fdadd0decd433f1690a450ef4748d349 Mon Sep 17 00:00:00 2001 From: GameScripting Date: Sat, 23 Aug 2014 14:22:51 +0200 Subject: [PATCH 1/2] Update README.md changed the api post example, to what worked for me --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9b0f75..cdba123 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,10 @@ See [types](#types) for informations about alert configurations. ## Events -An event represent something to monitor at a defined date. For example if I'm monitoring the temperature in my home, I'll post an event `home.temperature` with a property `temp`: +An event represent something to monitor at a defined date. For example if I'm monitoring the temperature in my home, I'll post an event `home.temperature` with a property `temperature`: ``` -$ curl -X POST --data '{ "type":"home.temperature", "properties": { "temperature": 66 } }' http://localhost:5000/api/events +$ curl -X POST --data '{ "type":"home.temperature", "properties": { "temperature": 66 } }' http://localhost:5000/api/events?type=home.temperature ``` ## Visualizations From 3f1ca46b67a17a71ed7831ea8ebb293f85943628 Mon Sep 17 00:00:00 2001 From: GameScripting Date: Wed, 27 Aug 2014 18:38:48 +0200 Subject: [PATCH 2/2] Update README.md added -H "Content-Type:application/json" to the curl example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cdba123..4a3309b 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ See [types](#types) for informations about alert configurations. An event represent something to monitor at a defined date. For example if I'm monitoring the temperature in my home, I'll post an event `home.temperature` with a property `temperature`: ``` -$ curl -X POST --data '{ "type":"home.temperature", "properties": { "temperature": 66 } }' http://localhost:5000/api/events?type=home.temperature +$ curl -X POST -H "Content-Type:application/json" --data '{ "type":"home.temperature", "properties": { "temperature": 66 } }' http://localhost:5000/api/events ``` ## Visualizations