No description
Find a file
2022-09-23 18:44:02 -05:00
src feat: add unit selection, and feels like function 2022-09-23 18:44:02 -05:00
tests feat: add unit selection, and feels like function 2022-09-23 18:44:02 -05:00
config.nims add files 2022-07-07 20:17:59 -05:00
LICENSE Create LICENSE 2022-09-23 09:25:31 -05:00
README.md Update README.md 2022-07-08 02:34:50 +00:00
wttrin.nimble update license 2022-09-23 14:26:01 +00:00

wttrin

A small nim library that fetches weather from wttr.in

IMPORTANT: if you use this library in your code you will need to build your nim project with the ssl flag

nim c -r -d:ssl <filename>

Usage

getTemp()

The first (and most used) function is getTemp()
This function has an optional parameter city which should be a city in lowercase
If the city parameter isn't provided it defaults to using your current location

import wttrin

echo getTemp

getCondition()

Another function, 'getCondition()', can be used to get the weather condition as an emoji

import wttrin

echo getCondition

getUnit()

The final function, 'getUnit()', can be used to get the current unit of weather

import wttrin

echo getUnit