Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

github.com/mr-joshcrane/weather_api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mr-joshcrane/weather_api


Version published
Created
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

Package last updated on 05 Jan 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc