{"id":23326200,"url":"https://github.com/nirokay/bttrwttrin","last_synced_at":"2025-04-07T06:44:01.986Z","repository":{"id":221128350,"uuid":"753520204","full_name":"nirokay/bttrwttrin","owner":"nirokay","description":"Library to fetch weather for any city using [wttr.in](https://wttr.in/) API.","archived":false,"fork":false,"pushed_at":"2024-02-06T09:50:32.000Z","size":164,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T10:49:58.406Z","etag":null,"topics":["lib","library","nim","nim-lang","nimble","weather","weather-api","wttrin"],"latest_commit_sha":null,"homepage":"https://nirokay.github.io/nim-docs/bttrwttrin/bttrwttrin.html","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nirokay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-06T09:36:45.000Z","updated_at":"2024-07-24T11:32:05.000Z","dependencies_parsed_at":"2024-02-06T10:48:48.838Z","dependency_job_id":"bcadf220-5b7d-43ac-9aa1-72c722440fba","html_url":"https://github.com/nirokay/bttrwttrin","commit_stats":null,"previous_names":["nirokay/bttrwttrin"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2Fbttrwttrin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2Fbttrwttrin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2Fbttrwttrin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirokay%2Fbttrwttrin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirokay","download_url":"https://codeload.github.com/nirokay/bttrwttrin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608163,"owners_count":20965950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lib","library","nim","nim-lang","nimble","weather","weather-api","wttrin"],"created_at":"2024-12-20T19:15:02.593Z","updated_at":"2025-04-07T06:44:01.949Z","avatar_url":"https://github.com/nirokay.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bttrwttrin\n\n**Better wttr.in** is a library, that lets you easily request weather for any\ncity using the [wttr.in](https://wttr.in/) API.\n\n## Usage\n\nFor type reference see [typedefs file](./src/bttrwttrin/typedefs.nim) or the\n[documentation](https://nirokay.github.io/nim-docs/bttrwttrin/bttrwttrin.html).\n\n### Requesting `WeatherRequest` object\n\n```nim\nimport bttrwttrin\n\nlet weather: WeatherRequest = getWeather(\"Berlin\")\n```\n\n### Daily forecasts\n\n```nim\nimport std/[options]\nimport bttrwttrin\n\nlet weather: WeatherRequest = getWeather(\"Berlin\")\n\nlet today: WeatherForecast = get weather.getToday()\n# This is equivalent to `weather.forecasts[0]`,\n# but safer (no chance of `IndexDefect`), however\n# it is your responsibility to handle `None` values!\n\nlet\n    tomorrow: Option[WeatherForecast] = weather.getTomorrow()\n    overmorrow: Option[WeatherForecast] = weather.getOvermorrow()\n```\n\n### Current weather\n\n```nim\nimport bttrwttrin\n\nlet\n    weather: WeatherRequest = getWeather(\"Berlin\")\n    current: CurrentWeather = weather.current\n\n# Temperature (has two fields for metric (°C) and imperial (°F))\nlet temperature: UnitData[int] = current.temperature\n\necho $temperature.metric \u0026 \"°C\"\necho $temperature.imperial \u0026 \"°F\"\n```\n\n## Installation\n\n### Nimble\n\n`nimble install bttrwttrin` (not yet included in package manager)\n\n### Building from source\n\n`git clone https://github.com/nirokay/bttrwttrin \u0026\u0026 cd bttrwttrin \u0026\u0026 nimble install`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirokay%2Fbttrwttrin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirokay%2Fbttrwttrin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirokay%2Fbttrwttrin/lists"}