Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 1.09 KB

README.md

File metadata and controls

47 lines (36 loc) · 1.09 KB

World Weather Online's API Client [wwogc]

-- Build Status

import "github.com/Rohithzr/worldweatheronline_go_client"

Usage

create Client

credentials := wwogc.Credentials{
			"your_key",
			"json",
			"premium",
			"EN"
			}

create Query

param1 := wwogc.Params{"q","Delhi"}
param2 := wwogc.Params("num_of_days", "1"}
query := []wwogc.Params{param1, param2}	

Methods

Methods available are:

  1. Search API (searchApi)
  2. Local Weather API (localWeatherApi)
  3. Time Zone API (tizeZoneApi)
  4. Ski Weather API (skiWeatherApi)
  5. Marine Weather API (marineWeatherApi)
  6. Historical Weather API (historicalWeatherApi)

func GetData

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)