Socket
Socket
Sign inDemoInstall

github.com/alyvusal/weather_api

Package Overview
Dependencies
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/alyvusal/weather_api


Version published

Readme

Source

Example import:

import "github.com/mr-joshcrane/weather_api"

Example of Library Usage

conditions, err := weather_api.Get(location, API_KEY)
if err != nil {
   //handle error appropriately
}
fmt.Println(conditions)

Example of CLI usage (bash)

go build -o weather src/main.go
./weather Perth,AU

What is it and why would I use it?

A simple, easy to use library that creates a client that leverages the OpenWeatherMap API (https://openweathermap.org/api). If you want basic weather information about a location, this might do the job for you!

OpenWeatherMap API Key

To use the OpenWeatherMap API, you need an API Key, see instructions at their FAQ on how to obtain one (https://openweathermap.org/faq).

Once you have the key, you should set it as the OPENWEATHERMAP_API_KEY environment variable.

Mac/Unix

export OPENWEATHERMAP_API_KEY=yourAPIKeyhere 

Windows

set OPENWEATHERMAP_API_KEY=yourAPIKeyhere

FAQs

Last updated on 06 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc