Skip to content

paulbes/go-pedal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Paul B. Beskow
Nov 3, 2018
4241488 · Nov 3, 2018

History

14 Commits
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Oct 25, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018
Nov 3, 2018

Repository files navigation

Build Status

go-pedal

A simple client for interacting with https://developer.oslobysykkel.no/api, this demo application will print some basic information about the bike stations.

Usage

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.

Using go

Ensure that you have setup your go environment correctly: https://golang.org/doc/install

Testing

# Display the help information
make help

# Run all the checks (linting, formatting, tests, ...)
make check

Running

# 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}

Using docker

# 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

As a go library

go get github.com/paulbes/go-pedal/pedal

Testing the local API

# Get all stations
curl "http://localhost:8080/v1/stations"

# A specific station
curl "http://localhost:8080/v1/stations/183"

Releases

No releases published

Packages

No packages published