Mercurial > code > home > repos > gcalendarwatch
diff calsync/gcalclient/gcalclient.go @ 79:30ad34850ef1
redo url structure (still not the same as the old version)
author | drewp@bigasterisk.com |
---|---|
date | Fri, 06 Sep 2024 18:24:38 -0700 |
parents | 50ddf6a48816 |
children | 79320eff10f2 |
line wrap: on
line diff
--- a/calsync/gcalclient/gcalclient.go Fri Sep 06 17:54:52 2024 -0700 +++ b/calsync/gcalclient/gcalclient.go Fri Sep 06 18:24:38 2024 -0700 @@ -16,7 +16,8 @@ "google.golang.org/api/calendar/v3" ) -const urlBase = "http://bigasterisk.com/calendar/" +const calUrlBase = "http://bigasterisk.com/calendar/" +const eventUrlBase = "http://bigasterisk.com/calendarEvent/" type GCalClient struct { ctx context.Context @@ -31,11 +32,11 @@ } func MakeCalUrl(calId string) string { - return urlBase + url.QueryEscape(calId) + return calUrlBase + url.QueryEscape(calId) } func MakeEventUrl(calUrl string, evId string) string { - return calUrl + "/" + url.QueryEscape(evId) + return eventUrlBase + url.QueryEscape(evId) } func New(ctx context.Context) (*GCalClient, error) {