{"id":21627184,"url":"https://github.com/xxczaki/airly","last_synced_at":"2025-04-11T12:47:00.411Z","repository":{"id":57174988,"uuid":"159890246","full_name":"xxczaki/airly","owner":"xxczaki","description":"Simple wrapper for Airly API, works in Node.js \u0026 the browser","archived":false,"fork":false,"pushed_at":"2022-07-31T20:07:19.000Z","size":45,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:30:08.913Z","etag":null,"topics":["air","air-pollution","air-pollution-levels","airly","airly-api","api","async-await","data","got","js","library","nodejs","npm","package","pollution","promise","simple","small","smog","wrapper"],"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/xxczaki.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"xxczaki","patreon":"akepinski"}},"created_at":"2018-11-30T23:38:33.000Z","updated_at":"2024-05-01T14:30:08.914Z","dependencies_parsed_at":"2022-08-28T21:00:22.532Z","dependency_job_id":null,"html_url":"https://github.com/xxczaki/airly","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/xxczaki%2Fairly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxczaki%2Fairly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxczaki%2Fairly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxczaki%2Fairly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxczaki","download_url":"https://codeload.github.com/xxczaki/airly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248402545,"owners_count":21097331,"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":["air","air-pollution","air-pollution-levels","airly","airly-api","api","async-await","data","got","js","library","nodejs","npm","package","pollution","promise","simple","small","smog","wrapper"],"created_at":"2024-11-25T01:15:45.965Z","updated_at":"2025-04-11T12:47:00.383Z","avatar_url":"https://github.com/xxczaki.png","language":"TypeScript","funding_links":["https://github.com/sponsors/xxczaki","https://patreon.com/akepinski","https://www.patreon.com/akepinski"],"categories":[],"sub_categories":[],"readme":"# Airly :cloud:\n\n\u003e Simple wrapper for [Airly API](https://developer.airly.eu/docs)\n\n[![Build Status](https://travis-ci.org/xxczaki/airly.svg?branch=master)](https://travis-ci.org/xxczaki/airly) \n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) \n[![Install size](https://packagephobia.now.sh/badge?p=airly)](https://packagephobia.now.sh/result?p=airly)\n\n[**Czytaj po polsku :poland:**](https://github.com/xxczaki/airly/blob/master/readme_pl.md)\n\n## Highlights\n\n* Simple, asynchronous API\n* Works in Node.js \u0026 the browser\n* Uses the 2.0 version of Airly API\n* Full API coverage\n* Actively maintained\n* Lightweight\n* Written in TypeScript\n\n## Install\n\n```\n$ npm install airly\n```\n\n\u003ca href=\"https://www.patreon.com/akepinski\"\u003e\n\t\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"\u003e\n\u003c/a\u003e\n\n\n## Usage\n\n```js\nconst Airly = require('airly');\n\nconst airly = new Airly('API_KEY');\n\n(async () =\u003e {\n\ttry {\n\t\tconst data = await airly.installationInfo(240);\n\t\tconsole.log(data);\n\t} catch (error) {\n\t\tconsole.log(error);\n\t}\n})();\n```\n\n\n## API\n\n\u003e Check out the [`examples`](https://github.com/xxczaki/airly/tree/master/examples) folder :rocket:\n\n### new Airly(key, language)\n\n\u003e Constructor for other operations\n\n**key**\n\nType: `string`\n\nYour Airly API key. You can obtain one [here](https://developer.airly.eu/).\n\n**language**\n\nType: `string`\n\nDefault: `en`\n\nGet air quality descriptions in specified language. Currently supported languages are English ('en' - default) and Polish ('pl').\n\nFor more information check out [Airly's documentation](https://developer.airly.eu/docs#general.language)\n\n### airly.installationMeasurements(id)\n\n\u003e Returns detailed measurements (current, historical and future) for an installation\n\n**id**\n\nType: `number`\n\nUnique number of the installation\n\n### airly.installationInfo(id)\n\n\u003e Returns information about specified installation\n\n**id**\n\nType: `number`\n\nUnique number of the installation\n\n### airly.nearestInstallations(lat, lng, maxDistanceKM, maxResults)\n\n\u003e Returns information about the nearest installations (including their ID's)\n\n**lat**\n\nType: `number`\n\nLatitude\n\n**lng**\n\nType: `number`\n\nLongitude\n\n**maxDistanceKM**\n\nType: `number`\n\nDefault: 3\n\nAll the returned installations must be located within this limit from the given point (in km); negative value means no limit.\n\n**maxResults**\n\nType: `number`\n\nDefault: -1\n\nMaximum number of installations to return; negative value means no limit.\n\n### airly.nearestMeasurements(lat, lng, maxDistanceKM)\n\n\u003e Returns detailed measurements (current, historical and future) from the installation which is closest to a given point\n\n**lat**\n\nType: `number`\n\nLatitude\n\n**lng**\n\nType: `number`\n\nLongitude\n\n**maxDistanceKM**\n\nType: `number`\n\nDefault: 3\n\nAll the returned installations must be located within this limit from the given point (in km); negative value means no limit.\n\n### airly.pointMeasurements(lat, lng)\n\n\u003e Returns detailed measurements (current, historical and future) for a map point, which can be interpolated from nearby installations\n\n**lat**\n\nType: `number`\n\nLatitude\n\n**lng**\n\nType: `number`\n\nLongitude\n\n### airly.metaIndexes()\n\n\u003e Returns a list of IndexTypes supported by the platform\n\n### airly.metaMeasurements()\n\n\u003e Returns a list of MeasurementTypes supported by the platform\n\n## License\n\nMIT © [Antoni Kepinski](https://kepinski.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxczaki%2Fairly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxczaki%2Fairly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxczaki%2Fairly/lists"}