Skip to content

Commit e7f5505

Browse files
Merge pull request #117 from nakulbh/fix/add-env-example-116
fix: add missing .env.example and service-alerts-url flag
2 parents 929a0b6 + 738dea4 commit e7f5505

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Environment variables for Maglev OneBusAway API Server
2+
# Copy this file to .env and fill in the required values
3+
4+
# Real-time data authentication header value for Unitrans GTFS-RT feeds
5+
# This is required for accessing the UMO IQ API for real-time transit data
6+
REALTIME_AUTH_HEADER_VALUE=your_api_key_here

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ run: build
99
-trip-updates-url=https://webservices.umoiq.com/api/gtfs-rt/v1/trip-updates/unitrans \
1010
-vehicle-positions-url=https://webservices.umoiq.com/api/gtfs-rt/v1/vehicle-positions/unitrans \
1111
-realtime-auth-header-name=x-umo-iq-api-key \
12-
-realtime-auth-header-value=$(REALTIME_AUTH_HEADER_VALUE)
13-
-service-alerts-url=https://webservices.umoiq.com/api/gtfs-rt/v1/service-alerts/unitrans \
12+
-realtime-auth-header-value=$(REALTIME_AUTH_HEADER_VALUE) \
13+
-service-alerts-url=https://webservices.umoiq.com/api/gtfs-rt/v1/service-alerts/unitrans
1414

1515
build:
1616
go build -gcflags "all=-N -l" -o bin/maglev ./cmd/api

cmd/api/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func main() {
3434
flag.StringVar(&gtfsCfg.VehiclePositionsURL, "vehicle-positions-url", "https://api.pugetsound.onebusaway.org/api/gtfs_realtime/vehicle-positions-for-agency/40.pb?key=org.onebusaway.iphone", "URL for a GTFS-RT vehicle positions feed")
3535
flag.StringVar(&gtfsCfg.RealTimeAuthHeaderKey, "realtime-auth-header-name", "", "Optional header name for GTFS-RT auth")
3636
flag.StringVar(&gtfsCfg.RealTimeAuthHeaderValue, "realtime-auth-header-value", "", "Optional header value for GTFS-RT auth")
37+
flag.StringVar(&gtfsCfg.ServiceAlertsURL, "service-alerts-url", "", "URL for a GTFS-RT service alerts feed")
3738
flag.StringVar(&gtfsCfg.GTFSDataPath, "data-path", "./gtfs.db", "Path to the SQLite database containing GTFS data")
3839
flag.Parse()
3940

0 commit comments

Comments
 (0)