diff --git a/onecall.go b/onecall.go index 8bf5bb4..22064cb 100644 --- a/onecall.go +++ b/onecall.go @@ -193,7 +193,7 @@ func (w *OneCallData) OneCallByCoordinates(location *Coordinates) error { // OneCallTimeMachine will provide the onecall timemachine weather with the // provided location coordinates and unix timestamp func (w *OneCallData) OneCallTimeMachine(location *Coordinates, datetime time.Time) error { - response, err := w.client.Get(fmt.Sprintf(fmt.Sprintf(onecallURL, "timemachine?appid=%s&lat=%f&lon=%f&units=%s&lang=%s&dt=%d"), w.Key, location.Latitude, location.Longitude, w.Unit, w.Lang, datetime.Unix())) + response, err := w.client.Get(fmt.Sprintf(fmt.Sprintf(onecallURL, "/timemachine?appid=%s&lat=%f&lon=%f&units=%s&lang=%s&dt=%d"), w.Key, location.Latitude, location.Longitude, w.Unit, w.Lang, datetime.Unix())) if err != nil { return err } diff --git a/openweathermap.go b/openweathermap.go index 72415fe..0bc69cf 100644 --- a/openweathermap.go +++ b/openweathermap.go @@ -35,7 +35,7 @@ var ( var DataUnits = map[string]string{"C": "metric", "F": "imperial", "K": "internal"} var ( baseURL = "https://api.openweathermap.org/data/2.5/weather?%s" - onecallURL = "https://api.openweathermap.org/data/3.0/onecall/%s" + onecallURL = "https://api.openweathermap.org/data/3.0/onecall%s" iconURL = "https://openweathermap.org/img/w/%s" groupURL = "http://api.openweathermap.org/data/2.5/group?%s" stationURL = "https://api.openweathermap.org/data/2.5/station?id=%d"