Home

Awesome

Simple Transit API

A simple transit api written in Go with gtfsparser and Echo

Quickstart

There are 2 agencies already setup out of the box that you can take a look at in the providers folder. Each agency will need to be setup with the unique id, name and the gtfs url.

package providers

import "go-gtfs-server/app/model"

var StLouisConfig = model.AgencyConfig{
	Id:             "stlouis",
	Name:           "Saint Louis Metro",
	Url:            "https://www.metrostlouis.org/Transit/google_transit.zip",
}

On Start

When the server is first started it will load all of the gtfs files that are in the listed in the providers/all.go file. Once those are loaded they are stored with their id's as unique identifiers in memory and accessible via the rest api.

On Update

In order to keep your data up to date you will need to set the UPDATE_INTERVAL with a cron string. Once you have that setup this will allow for your gtfs to be updated on a regular interval.

Stops

Routes

Trips