{"id":26127783,"url":"https://github.com/kwabenberko/openweathermap-node","last_synced_at":"2025-09-05T19:36:55.431Z","repository":{"id":48298028,"uuid":"104332145","full_name":"KwabenBerko/OpenWeatherMap-Node","owner":"KwabenBerko","description":"An Openweathermap wrapper for nodejs","archived":false,"fork":false,"pushed_at":"2022-12-07T17:28:34.000Z","size":18,"stargazers_count":10,"open_issues_count":4,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T06:01:38.924Z","etag":null,"topics":["http","nodejs","npm","openweathermap","openweathermap-api","request","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/KwabenBerko.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}},"created_at":"2017-09-21T10:05:13.000Z","updated_at":"2021-08-02T18:09:34.000Z","dependencies_parsed_at":"2023-01-24T19:18:54.447Z","dependency_job_id":null,"html_url":"https://github.com/KwabenBerko/OpenWeatherMap-Node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwabenBerko%2FOpenWeatherMap-Node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwabenBerko%2FOpenWeatherMap-Node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwabenBerko%2FOpenWeatherMap-Node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KwabenBerko%2FOpenWeatherMap-Node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KwabenBerko","download_url":"https://codeload.github.com/KwabenBerko/OpenWeatherMap-Node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750872,"owners_count":21155797,"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":["http","nodejs","npm","openweathermap","openweathermap-api","request","wrapper"],"created_at":"2025-03-10T18:37:37.546Z","updated_at":"2025-04-13T17:22:57.377Z","avatar_url":"https://github.com/KwabenBerko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## OpenWeatherMap-Node\nAn Openweathermap wrapper for nodejs\n\n**You need an API Key to use the OpenWeatherMap API. Head on over to their [website](http://openweathermap.org/) if you don't already have one.**\n\n\n## Installation\n\n``` javascript\nnpm install openweathermap-node\n```\n\n## Usage\n\n#### Instantiate the OpenWeatherMapHelper class\n\n``` javascript \nconst OpenWeatherMapHelper = require(\"openweathermap-node\");\n```\n#### Set your API Key (Required) \n\n``` javascript\nconst helper = new OpenWeatherMapHelper(\n\t{\n\t\tAPPID: 'YOUR_OPENWEATHERMAP_API_KEY_GOES_HERE',\n\t\tunits: \"imperial\",\n\t\tlang: \"en\"\n\t}\n);\n```\n\n\n##### Unit Options(Optional, Kelvin by default) : \n\n1. ```imperial```\n\n2. ```metric```\n\n##### Language Options(Optional, English by default) : \n\nCode \t\t | Language\n------------ | -------------\naf           | Afrikaans\nal           | Albanian\nar           | Arabic\naz           | Azerbaijani\nbg           | Bulgarian\nca           | Catalan\ncz           | Czech\nda           | Danish\nde           | German\nel           | Greek\nen           | English\neu           | Basque\nfa           | Persian (Farsi)\nfi           | Finnish\nfr           | French\ngl           | Galician\nhe           | Hebrew\nhi           | Hindi\nhr           | Croatian\nhu           | Hungarian\nid           | Indonesian\nit           | Italian\nja           | Japanese\nkr           | Korean\nla           | Latvian\nlt           | Lithuanian\nmk           | Macedonian\nno           | Norwegian\nnl           | Dutch\npl           | Polish\npt           | Portuguese\npt_br        | Português Brasil\nro           | Romanian\nru           | Russian\nsv, se       | Swedish\nsk           | Slovak\nsl           | Slovenian\nsp, es       | Spanish\nsr           | Serbian\nth           | Thai\ntr           | Turkish\nua, uk       | Ukrainian\nvi           | Vietnamese\nzh_cn        | Chinese Simplified\nzh_tw        | Chinese Traditional\nzu           | Zulu\n\n## Features\n\n\n### (1) Current Weather\n#### Get current weather by City Name:\n\n```javascript\nhelper.getCurrentWeatherByCityName(\"Accra\", (err, currentWeather) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(currentWeather);\n\t}\n});\n```\n\n#### Get current weather by City ID:\n```javascript\nhelper.getCurrentWeatherByCityID(\"524901\", (err, currentWeather) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(currentWeather);\n\t}\n});\n```\n#### Get current weather by Geographic Coordinates:\n\n```javascript\nhelper.getCurrentWeatherByGeoCoordinates(5.6037, 0.1870, (err, currentWeather) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(currentWeather);\n\t}\n});\n```\n#### Get current weather by Zip Code:\n```javascript\nhelper.getCurrentWeatherByZipCode(\"90003\", (err, currentWeather) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(currentWeather);\n\t}\n});\n```\n### (2) 5 day / 3 hour forecast\n#### Get three hour forecast by City Name:\n```javascript\nhelper.getThreeHourForecastByCityName(\"Pretoria\", (err, threeHourForecast) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(threeHourForecast);\n\t}\n});\n\n```\n#### Get three hour forecast by City ID:\n```javascript\nhelper.getThreeHourForecastByCityID(\"524901\", (err, threeHourForecast) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(threeHourForecast);\n\t}\n});\n\n```\n\n#### Get three hour forecast by Geographic Coordinates:\n```javascript\nhelper.getThreeHourForecastByGeoCoordinates(6.5244,3.3792, (err, threeHourForecast) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(threeHourForecast);\n\t}\n});\n\n```\n#### Get three hour forecast by Zip Code:\n```javascript\nhelper.getThreeHourForecastByZipCode(\"94040\", (err, threeHourForecast) =\u003e {\n\tif(err){\n\t\tconsole.log(err);\n\t}\n\telse{\n\t\tconsole.log(threeHourForecast);\n\t}\n});\n\n```\n\n\n### Upcoming Feature\n1. 16 day / daily forecast \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwabenberko%2Fopenweathermap-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkwabenberko%2Fopenweathermap-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwabenberko%2Fopenweathermap-node/lists"}