Add the `GetBrengUrl` method to `Quay`
parent
3d6478916e
commit
f52890f58a
7
main.go
7
main.go
|
@ -1,7 +1,9 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Route struct {
|
type Route struct {
|
||||||
|
@ -26,6 +28,11 @@ func (q Quay) IsInterestingDeparture(d Departure) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (q Quay) GetBrengUrl() string {
|
||||||
|
param := fmt.Sprintf("{\"quayid\":\"%s\",\"name\":\"%s\",\"town\":\"%s\"}", q.ID, q.Name, q.Town)
|
||||||
|
return fmt.Sprint("https://www.breng.nl/nl/resultaten/halte-informatie/?stop=%s", url.QueryEscape(param))
|
||||||
|
}
|
||||||
|
|
||||||
var BusClient *http.Client
|
var BusClient *http.Client
|
||||||
var Quays []Quay = []Quay{}
|
var Quays []Quay = []Quay{}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue