Skip to content

Commit

Permalink
Added missing Visibility field on CurrentWeatherData struct and chang…
Browse files Browse the repository at this point in the history
…ed the URL to HTTPS (#100)
  • Loading branch information
0ry0n committed Mar 25, 2022
1 parent 4431300 commit 0d6745a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions current.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type CurrentWeatherData struct {
Base string `json:"base"`
Weather []Weather `json:"weather"`
Main Main `json:"main"`
Visibility int `json:"visibility"`
Wind Wind `json:"wind"`
Clouds Clouds `json:"clouds"`
Rain Rain `json:"rain"`
Expand Down
18 changes: 9 additions & 9 deletions openweathermap.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ var errForecastUnavailable = errors.New("forecast unavailable")
// DataUnits represents the character chosen to represent the temperature notation
var DataUnits = map[string]string{"C": "metric", "F": "imperial", "K": "internal"}
var (
baseURL = "http://api.openweathermap.org/data/2.5/weather?%s"
iconURL = "http://openweathermap.org/img/w/%s"
stationURL = "http://api.openweathermap.org/data/2.5/station?id=%d"
forecast5Base = "http://api.openweathermap.org/data/2.5/forecast?appid=%s&%s&mode=json&units=%s&lang=%s&cnt=%d"
forecast16Base = "http://api.openweathermap.org/data/2.5/forecast/daily?appid=%s&%s&mode=json&units=%s&lang=%s&cnt=%d"
historyURL = "http://api.openweathermap.org/data/2.5/history/%s"
pollutionURL = "http://api.openweathermap.org/pollution/v1/co/"
uvURL = "http://api.openweathermap.org/data/2.5/"
dataPostURL = "http://openweathermap.org/data/post"
baseURL = "https://api.openweathermap.org/data/2.5/weather?%s"
iconURL = "https://openweathermap.org/img/w/%s"
stationURL = "https://api.openweathermap.org/data/2.5/station?id=%d"
forecast5Base = "https://api.openweathermap.org/data/2.5/forecast?appid=%s&%s&mode=json&units=%s&lang=%s&cnt=%d"
forecast16Base = "https://api.openweathermap.org/data/2.5/forecast/daily?appid=%s&%s&mode=json&units=%s&lang=%s&cnt=%d"
historyURL = "https://api.openweathermap.org/data/2.5/history/%s"
pollutionURL = "https://api.openweathermap.org/pollution/v1/co/"
uvURL = "https://api.openweathermap.org/data/2.5/"
dataPostURL = "https://openweathermap.org/data/post"
)

// LangCodes holds all supported languages to be used
Expand Down

0 comments on commit 0d6745a

Please sign in to comment.