import "github.com/Rohithzr/worldweatheronline_go_client"
credentials := wwogc.Credentials{
"your_key",
"json",
"premium",
"EN"
}
param1 := wwogc.Params{"q","Delhi"}
param2 := wwogc.Params("num_of_days", "1"}
query := []wwogc.Params{param1, param2}
Methods available are:
- Search API (searchApi)
- Local Weather API (localWeatherApi)
- Time Zone API (tizeZoneApi)
- Ski Weather API (skiWeatherApi)
- Marine Weather API (marineWeatherApi)
- Historical Weather API (historicalWeatherApi)
Pass the Above created query and credentials variable and the method you want to call
code, data := GetData(query, credentials, "searchApi")
Gets the data from official world weather online servers and returns
- code: HTTP Status Code (0 if error)
- data: HTTP Body (blank if error)