new GoodchargeStation(options)
| Option | Default | Meaning |
|---|---|---|
apiKey | required | The station's key. Throws invalid_api_key if malformed. |
baseUrl | https://api.goodcharge.app | API origin. |
timeoutMs | 10000 | Per attempt. Must be a positive integer. |
maxRetries | 3 | Retries after 429, 5xx, a timeout or a network error. Must be a non-negative integer. |
fetch | global fetch | Custom fetch implementation. |
A non-integer or out-of-range timeoutMs or maxRetries throws invalid_option synchronously, from the constructor — before any request is made.