Skip to content

v0.2.2 - Smaller size, more access

Choose a tag to compare

@peferb peferb released this 12 Mar 11:32

v0.2.2

Breaking changes

  • Replaced the package import usage with sl.NewApi().
  • Moved data structure selection from func name to param.

Example new usage

import (
	"github.com/peferb/trafiklab/sl"
	. "github.com/peferb/trafiklab/sl/api"
)

func main() {
	departuresApi := sl.NewApi(RealTimeDeparturesV4, JSON, "you api key here")
}

New functionality

  • Added "SL Nearby stops v2.0 (Närliggande hållplatser 2)"
  • Added "SL Stops and lines v2.0 AKA LineData (SL Hållplatser och Linjer 2)"

Misc

  • Much smaller codebase / lib size
  • Less bloated dev interface
  • Added tests