https://github.com/attron/amtrak
simple amtrak data wrapper for go
https://github.com/attron/amtrak
amtrak api go golang tracking-api train trains trains-information wrapper
Last synced: 3 months ago
JSON representation
simple amtrak data wrapper for go
- Host: GitHub
- URL: https://github.com/attron/amtrak
- Owner: ATTron
- License: gpl-3.0
- Created: 2022-01-21T21:50:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-11T05:39:03.000Z (over 1 year ago)
- Last Synced: 2025-04-06T21:32:35.632Z (6 months ago)
- Topics: amtrak, api, go, golang, tracking-api, train, trains, trains-information, wrapper
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AMTRAK
An unoffical train status wrapper for use with Amtrak!
This package uses the data available from [amtrak](https://maps.amtrak.com/services/MapDataService/trains/getTrainsData) and converts it into usable train information.## Usage
```bash
go get -u "github.com/ATTron/amtrak"
``````go
import (
"fmt"
"github.com/ATTron/amtrak"
)func main() {
fmt.Println("SHOWING TRAIN 95: ", amtrak.GetTrain(95))
}
```#### Functions
Currently this only has 2 functions. Return a specific train or return every train.```go
import (
"github.com/ATTron/amtrak"
)
func main() {
allTrains := amtrak.GetAllTrains()
myTrain := amtrak.GetTrain(95)
}
```#### Additional Docs
Full documentation can be found on [pkg.go.dev](https://pkg.go.dev/github.com/ATTron/amtrak)