diff --git a/main.go b/main.go index 909e377..fa2fd7b 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,9 @@ package main import ( + "fmt" "net/http" + "net/url" ) type Route struct { @@ -26,6 +28,11 @@ func (q Quay) IsInterestingDeparture(d Departure) bool { 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 Quays []Quay = []Quay{}