aboutsummaryrefslogtreecommitdiffstats
path: root/test/endpoints.sh
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-02-25 08:49:18 +0000
committerterminaldweller <thabogre@gmail.com>2021-02-25 08:49:18 +0000
commitff12756915d452e7b92959062ed6315adf0e424e (patch)
treebb86d9405a8a63d4865594f20a13327920485cf8 /test/endpoints.sh
parentremoved the expression parser. using a lib now. the addalert endpoint is work... (diff)
downloadhived-ff12756915d452e7b92959062ed6315adf0e424e.tar.gz
hived-ff12756915d452e7b92959062ed6315adf0e424e.zip
added a new endpoint for changelly. added somewhat decent logging. cleaned up the code a bit. the secrets are all environment variables now since we want publicly availale CI. the api and postman docs are added. added travis integration.
Diffstat (limited to 'test/endpoints.sh')
-rwxr-xr-xtest/endpoints.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/endpoints.sh b/test/endpoints.sh
new file mode 100755
index 0000000..0c47cd6
--- /dev/null
+++ b/test/endpoints.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+set -e
+set -x
+
+curl -X GET http://127.0.0.1:8008/price?name=CAKE&unit=USD
+curl -X GET http://127.0.0.1:8008/pair?one=ETH&two=CAKE&multiplier=4.0
+curl -X POST -H "Content-Type: application/json" -d '{"name":"alert1", "expr":"ETH>CAKE"}' http://127.0.0.1:8008/addalert