modulepackage
0.0.0-20200313060204-7e1cf15d0439
Repository: https://github.com/setheck/oba.git
Documentation: pkg.go.dev
# README
oba - Golang Api for One Bus Away
Summary
I wanted to write some apps that interface with one bus away and could not find a go api, so I wrote one! One Bus Away Documentation It was also a good excuse to have some fun with golang
Get
$ go get -u github.com/Setheck/oba
Import
import (
"log"
"github.com/Setheck/oba"
)
Use
Agency
func main() {
client := oba.NewDefaultClientS(server.URL, TestApiKey)
agency, e := client.Agency("1")
if e != nil {
log.Fatal(e)
}
}
AgenciesWithCoverage
func main() {
client := oba.NewDefaultClientS(server.URL, TestApiKey)
awcs, e := client.AgenciesWithCoverage()
if e != nil {
log.Fatal(e)
}
}
Route
func main() {
client := oba.NewDefaultClientS("http://api.pugetsound.onebusaway.org/api/where/", "TEST")
route, err := client.Route("1_100224")
if err != nil {
log.Fatal(err)
}
log.Print(route.ID)
}
# Packages
No description provided by the author
# Functions
NewDefaultClient - instantiate a new instance of a Client.
No description provided by the author
# Structs
Agency container object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Data container object.
No description provided by the author
No description provided by the author
Entry container object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
References - The <references/> element contains a dictionary of objects referenced by the main result payload.
No description provided by the author
Response Element - All responses are wrapped in a response element.
Route object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
Client - Interface for a One Bus Away Client.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author