Skip to content

Releases: peferb/trafiklab

v0.2.4 - Route Planner / SL Reseplanerare

Choose a tag to compare

@peferb peferb released this 19 Mar 11:38

Route Planner V3.1 AKA Travel Planner V3.1 (SL Reseplanerare 3.1)

Added support for Route Planner V3.1. But it's not a pretty implementation because Route Planner API breaks the general SL API structure.

How does Route Planner V3.1 diff against the other API:s?

  • All other API:s consists of one endpoint per API. Route Planner V3.1 consists of multiple endpoints.
  • All other API:s offers JSON as data return format. In Route Planner two of the endpoints only returns XML, I have
    suffixed those with "Xml".

v0.2.3 - Stlib params

Choose a tag to compare

@peferb peferb released this 18 Mar 22:02

All params is now golang standard types

The data format and api type is now plain strings instead of lib specific types.

I read Jack Lindamoods article Aspects of a good Go library which convinced me that standard params is more user friendliness than lib based type safety.

In this small particular case I really believe "user friendliness" > "type safety". Theres really no big win for that type safety here, its not much more than noise and might get in the way.

And also... NewApi returns Api and not whatever weird thing I returned before 😅

Oh, almost forgot! I think I shaved of a couple of bytes of the lib as well!

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

First official version

Choose a tag to compare

@peferb peferb released this 06 Mar 23:11

v0.1.0

API:s available

  • SL Departures v4.0 (Realtidsinformation 4)
  • SL Service alerts v2.0 AKA Deviations (Störningsinformation 2)
  • SL Stop lookup v1.0 AKA TypeAhead (Platsuppslag)
  • SL Traffic status v2.0 AKA Traffic Situation (SL Trafikläget 2)

Data formats available

  • JSON/String
  • JSON/Bytes
  • XML/String
  • XML/Bytes

Test release

Choose a tag to compare

@peferb peferb released this 03 Mar 16:44
v0.0.1

Delete sub packages