A simple client for interacting with https://developer.oslobysykkel.no/api, this demo application will print some basic information about the bike stations.
Ensure that you have make and docker installed. You will also need a client identifier, which you can get by creating a by sykkel account.
Ensure that you have setup your go environment correctly: https://golang.org/doc/install
# Display the help information
make help
# Run all the checks (linting, formatting, tests, ...)
make check
# As a CLI
go run cmd/pedal/main.go -client-identifier {your client identifier}
# As an API
go run cmd/api/main.go -client-identifier {your client identifier}
# Building and running the CLI
CLIENT_IDENTIFIER={your client id} make cli-build cli-run
# Building and running the API
CLIENT_IDENTIFIER={your client id} make api-build api-run
go get github.com/paulbes/go-pedal/pedal
# Get all stations
curl "http://localhost:8080/v1/stations"
# A specific station
curl "http://localhost:8080/v1/stations/183"