Weather api - A Simple Weather API Example With Golang

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
Similar Resources

tasq is a simple HTTP-based task queue. Each task is represented as a string

tasq tasq is a simple HTTP-based task queue. Each task is represented as a string (it could be anything). Tasks are pushed to the queue via an HTTP en

Nov 3, 2022

This is a simple single-host reverse proxy that intercept and save HTTP requests and responses

This is a simple single-host reverse proxy that intercept and save HTTP requests and responses

HTTP Telescope Debug HTTP requests using a reverse proxy. Description This is a simple single-host reverse proxy that intercept and save HTTP requests

Mar 20, 2022

A Go HTTP client library for creating and sending API requests

A Go HTTP client library for creating and sending API requests

Sling Sling is a Go HTTP client library for creating and sending API requests. Slings store HTTP Request properties to simplify sending requests and d

Jan 7, 2023

Gotcha is an high level HTTP client with a got-like API

Gotcha is an high level HTTP client with a got-like API

Gotcha is an alternative to Go's http client, with an API inspired by got. It can interface with other HTTP packages through an adapter.

Dec 7, 2022

Basic repository with HTTP ping api and db setup

Simple API Simple REST API with database (postgres) integration HighLevel Agenda Integrating with postgres (few concepts) Live code walkthrough Detail

Jan 27, 2022

go http api to handle phishing resources requests

go http api to handle phishing resources requests (auth check, prometheus metrics, pushing to rabbit, logging to elasticsearch)

Oct 8, 2021

Fibonacci RESTful API - HTTP server that listens on a given port

Fibonacci RESTful API - HTTP server that listens on a given port

Jan 19, 2022

An enhanced http client for Golang

An enhanced http client for Golang

go-http-client An enhanced http client for Golang Documentation on go.dev 🔗 This package provides you a http client package for your http requests. Y

Dec 23, 2022
Speak HTTP like a local. (the simple, intuitive HTTP console, golang version)

http-gonsole This is the Go port of the http-console. Speak HTTP like a local Talking to an HTTP server with curl can be fun, but most of the time it'

Jul 14, 2021
This is repository for Simple HTTP GET golang app that counts standard deviation from random.org integers

Simple Get Deviation App This is repository for Simple HTTP GET golang app that counts standard deviation from random.org integers IMPORTANT: Because

Jan 10, 2022
Prototype to show how to transform an existing (SOAP) API into a modern streaming API

vSphere Event Streaming Prototype to show how to transform an existing (SOAP) API into a modern HTTP/REST streaming API. Details The vSphere Event Str

Nov 14, 2022
Http client call for golang http api calls

httpclient-call-go This library is used to make http calls to different API services Install Package go get

Oct 7, 2022
Simple HTTP and REST client library for Go

Resty Simple HTTP and REST client library for Go (inspired by Ruby rest-client) Features section describes in detail about Resty capabilities Resty Co

Jan 1, 2023
Simple web-hook based receiver executing things via HTTP request

Updater is a simple web-hook-based receiver executing things via HTTP requests and invoking remote updates without exposing any sensitive info, like ssh keys, passwords, etc.

Dec 19, 2022
a simple wrapper around resty to report HTTP calls metrics to prometheus

restyprom a simple wrapper around resty to report HTTP calls metrics to prometheus If you're using resty and want to have metrics of your HTTP calls,

Sep 25, 2022
simple mealie client

go-mealie A dirt simple go CLI client and badly written go library Enjoy this alpha release Config mealie can be configured using a yaml file or by us

Nov 27, 2022
Simple http client

www Simple http client for golang with user-friendly interface. Features Chainable API Direct file upload Timeout Cookie GZIP Charset detection Cleane

Nov 15, 2021
Simple HTTP package that wraps net/http

Simple HTTP package that wraps net/http

Jan 17, 2022