Package Exports
- @cityssm/green-button-subscriber
Readme
Green Button Subscriber
Handles the OAuth authentication, downloading, and parsing of Green Button API data.
❗ Currently only testing with UtilityAPI's Green Button implementation.
Installation
npm install @cityssm/green-button-subscriberUsage
⭐ All output is parsed and returned a fully typed object. ⭐
import * as greenButtonSubscriber from '@cityssm/green-button-subscriber'
// Pass the base URL, client ID, client secret, etc.
greenButtonSubscriber.setConfiguration(config)
// Get the authorizations
const greenButtonJson = await greenButtonSubscriber.getAuthorizations()Just Looking to Parse Green Button XML?
Check out @cityssm/green-button-parser.