Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 634 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 634 Bytes

Go API Client

API Docs:

WeatherAPI Documentation

Usage:

Download:

go get "github.com/kashifkhan0771/go-weather"
package main

import (
    "fmt"
    weatherClient "github.com/kashifkhan0771/go-weather"
)

func main() {
    config, err := weatherClient.NewWeatherAPIConfig(<Your_API_Key>)
    if err != nil {
        panic(err)
    }

    weather, err := config.GetCurrentWeather(weatherClient.Options{Query: "Paris"})
    if err != nil {
        panic(err)
    }

    fmt.Println(weather)
}