{"id":18726934,"url":"https://github.com/curium-rocks/openweathermap-client","last_synced_at":"2025-10-25T04:33:32.011Z","repository":{"id":37030628,"uuid":"384839972","full_name":"curium-rocks/openweathermap-client","owner":"curium-rocks","description":"A open weather map client written in typescript","archived":false,"fork":false,"pushed_at":"2024-10-29T18:16:31.000Z","size":1315,"stargazers_count":0,"open_issues_count":13,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-29T20:23:43.901Z","etag":null,"topics":["iot","nodejs","npm-package","open-weather-map","owm","typescript","weather"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/curium-rocks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2021-07-11T01:50:41.000Z","updated_at":"2023-07-07T21:52:36.000Z","dependencies_parsed_at":"2023-12-26T18:50:36.328Z","dependency_job_id":"2a6d0785-02ef-42f3-a8d0-940daf3afee6","html_url":"https://github.com/curium-rocks/openweathermap-client","commit_stats":{"total_commits":767,"total_committers":9,"mean_commits":85.22222222222223,"dds":0.5423728813559322,"last_synced_commit":"4a5ce5e10447e3fe0c105446f89586f3b4d7e2fa"},"previous_names":[],"tags_count":682,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fopenweathermap-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fopenweathermap-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fopenweathermap-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fopenweathermap-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/curium-rocks","download_url":"https://codeload.github.com/curium-rocks/openweathermap-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248189876,"owners_count":21062268,"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":["iot","nodejs","npm-package","open-weather-map","owm","typescript","weather"],"created_at":"2024-11-07T14:15:56.035Z","updated_at":"2025-10-25T04:33:26.975Z","avatar_url":"https://github.com/curium-rocks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openweathermap-client\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_openweathermap-client\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=curium-rocks_openweathermap-client) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_openweathermap-client\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=curium-rocks_openweathermap-client)[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_openweathermap-client\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=curium-rocks_openweathermap-client)\n\n\nA typescript OpenWeatherMap client, [API docs located here](https://openweathermap.org/api).\n\nAPIs supported.\n- OneCall\n- Pollution\n- CurrentWeather\n\nAPI documentation for this library can be found [here](https://curium-rocks.github.io/openweathermap-client/)\n\n## Example(s)\n\n```typescript\nimport axios from \"axios\";\nimport {OwmClient} from '@curium.rocks/openweathermap-client';\n\nconst apiToken = process.env.OWM_TOKEN;\nconst owmClient = new OwmClient(axios);\n\nconst currentWeather = await owmClient.current.getCurrentWeather({\n    appid: apiToken,\n    city: 'London'\n});\n\nconsole.log('The current weather in London: ', currentWeather);\n\nconst currentWeatherNearArea = await owmClient.current.getCurrentWeatherNearby({\n    appid: apiToken,\n    lat: 29.422789,\n    lon: -98.507065,\n    cnt: 50\n});\n\nconsole.log('The current weather for areas nearby: ', currentWeatherNearArea);\n\nconst currentWeatherInRegion = await owmClient.current.getCurrentWeatherForArea({\n    appid: apiToken,\n    bbox: [\n        {\n            lat: 41.76106,\n            lon: -89.45617,\n        },\n        {\n            lat: 42.69255,\n            lon: -85.94055\n        }\n    ]\n});\n\nconsole.log('The current weather data for the bounding area: ', currentWeatherInRegion);\n\nconst currentPollution = owmClient.pollution.getCurrentAirPollution({\n    appid: apiToken,\n    lat: 41.76106,\n    lon: -85.94055\n});\nconsole.log('The current pollution levels: ', currentPollution);\n\nconst forecastedPollution = await owmClient.pollution.getForecastedAirPollution({\n    appid: apiToken,\n    lat: 41.76106,\n    lon: -85.94055\n});\nconsole.log('The forecasted air pollution levels: ', forecastedPollution);\n\nconst historicalPollution = await owmClient.pollution.getHistoricalAirPollution({\n    lat: 41.76106,\n    lon: -85.94055,\n    start: new Date(new Date().getDate()-1),\n    end: new Date(),\n    appid: apiToken\n});\nconsole.log('The pollution levels for the past day: ', historicalPollution);\n\nconst allInOne = await owmClient.onecall.getDate({\n    lat: 41.76106,\n    lon: -85.94055,\n    appid: apiToken\n});\nconsole.log('The combined summary data is: ', allInOne);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurium-rocks%2Fopenweathermap-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurium-rocks%2Fopenweathermap-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurium-rocks%2Fopenweathermap-client/lists"}