{"id":22514773,"url":"https://github.com/cityssm/node-green-button-subscriber","last_synced_at":"2025-10-12T12:52:22.799Z","repository":{"id":185904259,"uuid":"673464646","full_name":"cityssm/node-green-button-subscriber","owner":"cityssm","description":"Handles the OAuth authentication, downloading, and parsing of Green Button® API data.","archived":false,"fork":false,"pushed_at":"2024-01-01T07:14:23.000Z","size":278,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T13:52:41.659Z","etag":null,"topics":["connect-my-data","energy-consumption","energy-usage","espi","green-button","openespi","utilityapi","xml-parser"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cityssm/green-button-subscriber","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/cityssm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-08-01T17:25:25.000Z","updated_at":"2023-10-05T18:03:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"2282a4d3-0c14-4e66-8d36-a6bafc573e02","html_url":"https://github.com/cityssm/node-green-button-subscriber","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"14e48a653cf97b6636e617cabb7b1080e5a2834a"},"previous_names":["cityssm/node-green-button-subscriber"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cityssm/node-green-button-subscriber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fnode-green-button-subscriber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fnode-green-button-subscriber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fnode-green-button-subscriber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fnode-green-button-subscriber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cityssm","download_url":"https://codeload.github.com/cityssm/node-green-button-subscriber/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fnode-green-button-subscriber/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262566829,"owners_count":23329681,"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":["connect-my-data","energy-consumption","energy-usage","espi","green-button","openespi","utilityapi","xml-parser"],"created_at":"2024-12-07T03:21:41.613Z","updated_at":"2025-10-12T12:52:17.769Z","avatar_url":"https://github.com/cityssm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Green Button® Subscriber for Node\n\n[![npm (scoped)](https://img.shields.io/npm/v/%40cityssm/green-button-subscriber)](https://www.npmjs.com/package/@cityssm/green-button-subscriber)\n[![DeepSource](https://app.deepsource.com/gh/cityssm/node-green-button-subscriber.svg/?label=active+issues\u0026show_trend=true\u0026token=9oj_5qvTuBqQRgbaUdjUnjOv)](https://app.deepsource.com/gh/cityssm/node-green-button-subscriber/?ref=repository-badge)\n[![Maintainability](https://api.codeclimate.com/v1/badges/d7942562aa48a93c896b/maintainability)](https://codeclimate.com/github/cityssm/node-green-button-subscriber/maintainability)\n\nHandles the OAuth authentication, downloading, and parsing of Green Button® data.\n\n## Important Notes\n\nThis code is for use with the\n[Green Button Connect My Data® (CMD) standard](https://www.greenbuttonalliance.org/green-button-connect-my-data-cmd).\nBefore it can be used with your utility company, you may have to undergo\na registration and approval process with that utility company to be formerly\nregistered as a third party solution provider.\n\n❗ _Due to the extensive registration process\nand the need to be a customer with the utility company to access data,\nthis module is currently only tested with\n[UtilityAPI's Green Button® CMD implementation](https://utilityapi.com/docs/greenbutton)._\n\n## Installation\n\n```bash\nnpm install @cityssm/green-button-subscriber\n```\n\n## Usage\n\n⭐ All output is parsed and returned as a fully typed object. ⭐\n\n```javascript\nimport { GreenButtonSubscriber } from '@cityssm/green-button-subscriber'\n\nconst configuration = {\n  baseUrl: 'https://greenbutton.example.com/',\n  accessToken: '0123456789abcdef'\n}\n\n// Pass the base URL, client ID, client secret, etc.\nconst greenButtonSubscriber = new GreenButtonSubscriber(configuration)\n\n// Get the authorizations\nconst greenButtonResponse = await greenButtonSubscriber.getAuthorizations()\n```\n\n## Related Projects\n\nIf you are looking to parse Green Button® XML data downloaded from a utility provider\nusing the [Green Button Download My Data® (DMD) standard](https://www.greenbuttonalliance.org/green-button-download-my-data-dmd), see the\n[City of Sault Ste. Marie's Green Button® Parser](https://github.com/cityssm/node-green-button-parser).\n\nIf you are looking for a full application to report on energy usage,\nsee [EMILE (Energy Monitoring in Less Effort)](https://github.com/cityssm/EMILE).\n\n## Trademarks\n\n® GREEN BUTTON is a registered trademark owned by Departments of the U.S. Government.\n\nThe City of Sault Ste. Marie is a [Liaison member of the Green Button Alliance](https://www.greenbuttonalliance.org/members/sault-ste-marie).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcityssm%2Fnode-green-button-subscriber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcityssm%2Fnode-green-button-subscriber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcityssm%2Fnode-green-button-subscriber/lists"}