{"id":13409656,"url":"https://github.com/nickolasclarke/openaq","last_synced_at":"2025-03-14T15:30:22.977Z","repository":{"id":57315259,"uuid":"79699328","full_name":"nickolasclarke/openaq","owner":"nickolasclarke","description":"A JS client for the OpenAQ API","archived":false,"fork":false,"pushed_at":"2017-03-14T07:36:21.000Z","size":9,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-05T18:04:47.131Z","etag":null,"topics":["air-quality","es2015","es6","iot","isomorphic","node","npm-module","openaq","sustainability"],"latest_commit_sha":null,"homepage":"https://openaq.org","language":"JavaScript","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/nickolasclarke.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}},"created_at":"2017-01-22T06:41:51.000Z","updated_at":"2022-04-08T11:08:58.000Z","dependencies_parsed_at":"2022-09-18T20:51:54.743Z","dependency_job_id":null,"html_url":"https://github.com/nickolasclarke/openaq","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/nickolasclarke%2Fopenaq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolasclarke%2Fopenaq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolasclarke%2Fopenaq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolasclarke%2Fopenaq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickolasclarke","download_url":"https://codeload.github.com/nickolasclarke/openaq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243600433,"owners_count":20317275,"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-quality","es2015","es6","iot","isomorphic","node","npm-module","openaq","sustainability"],"created_at":"2024-07-30T20:01:02.607Z","updated_at":"2025-03-14T15:30:22.560Z","avatar_url":"https://github.com/nickolasclarke.png","language":"JavaScript","funding_links":[],"categories":["Software Libraries","JavaScript"],"sub_categories":[],"readme":"# openaq\nA ES6 promise-based JS client for the [OpenAQ](https://openaq.org) API\n\n## Install:\n```bash\nnpm install openaq\n```\n```javascript \nconst openaq = require('openaq')\nconst client = new openaq\n```\n\n## API:\nAny parameters should be passed as an optional `params` object as seen in the examples.\n\n### [.getCities(params)](https://docs.openaq.org/#api-Cities)\n- example:\n```javascript\ncities().then(results =\u003e {\n  //results here\n})\n\n//with optional parameters\ncities({country:'US', page:2}).then(results =\u003e {\n  //results here\n})\n```\n\n### [.countries(params)](https://docs.openaq.org/#api-Countries)\n- example:\n```javascript\ncountries().then(results =\u003e {\n  //results here\n})\n\n//with optional parameters\ncountries({limit:10, page:2}).then(results =\u003e {\n  //results here\n})\n```\n### [.fetches(params)](https://docs.openaq.org/#api-Fetches)\n- example:\n```javascript\nfetches().then(results = {\n  //results here\n})\n\n//with optional parameters\nfetches({limit:10, page:2}).then(results =\u003e {\n  //results here\n})\n```\n\n### [.latest(params)](https://docs.openaq.org/#api-Latest)\n- example:\n```javascript\nlatest().then(results =\u003e {\n  //results here\n})\n\n//with optional parameters\nlatest({location:'Bowling Green', parameter:'o3'}).then(results =\u003e {\n  //results here\n})\n```\n\n### [.locations(params)](https://docs.openaq.org/#api-Locations)\n- example:\n```javascript\nlocations().then(results =\u003e {\n  //results here\n})\n\n//with optional parameters\nlocations({location:'Bowling Green', parameter:'o3'}).then(results =\u003e {\n  //results here\n})\n```\n\n### [.measurements(params)](https://docs.openaq.org/#api-Measurements)\n- example:\n```javascript\nmeasurements().then(results =\u003e {\n  //results here\n})\n\n//with optional parameters\nmeasurements({location:'Bowling Green', parameter:'o3'}).then(results =\u003e {\n  //results here\n})\n```\n\n### [.parameters()](https://docs.openaq.org/#api-Parameters)\n- example:\n```javascript\nparameters().then(results =\u003e {\n  //results here\n})\n```\n\n### [.sources(params)](https://docs.openaq.org/#api-Sources)\n- example:\n```javascript\n\nsources().then(results =\u003e {\n  //results here\n})\n\n//with optional parameters\nsources({limit:10, page:2}).then(results =\u003e {\n  //results here\n})\n```\n## TODO\n- add testing\n- make isomorphic (commonJS and ES2015 module support)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickolasclarke%2Fopenaq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickolasclarke%2Fopenaq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickolasclarke%2Fopenaq/lists"}