Some tips for the integration of Forecast.Solar into your APP.
The API key will always match this regular expression and should checked during configuration of an APP.
If a API key was given by user, you can check if it is valid with
Returns HTTP status
200 on success with key information as payload,
HTTP return codes
- 200: ok
- 400: A malformed API key was provided or the URL is not correct build
- 401 or 403: An invalid API key was provided
See the message section of the reponse for error code and text.
To check, if the given location is valid, you can use the check route.
When a chart is loaded, a custom event is fired:
The event details hold in
container the chart wrapper.
window.addEventListener('fs.chart.loaded', e => console.log(e.detail.container));