- Golang installed (https://golang.org/)
go run *.go
In alternative:
go build && ./slack-tube-service
Just connect to localhost:1123
- Docker daemon running on the local machine or on a docker host (https://www.docker.com/products/docker-toolbox)
docker build -t slack-tube-service .
docker run -it --rm --name slack-tube-service -p 1123:1123 slack-tube-service
Just connect to localhost:1123
Find out your IP: docker-machine ip `docker-machine active`
Connect to that IP, port 1123
.
GET /api/tubestatus/
-> retrieve status for all the linesGET /api/tubestatus/{line}
-> retrieve status for a specific line (e.g.GET /api/tubestatus/Bakerloo
)POST /api/slack/tubestatus
-> retrieve status for all the lines with slack-friendly formatting (uses auth token to validate slack client)PUT /api/slack/token/{token}
-> adds a slack token to the authorised listDELETE /api/slack/token/{token}
-> removes a slack token from the authorised list