1.0.0 • Published 6 years ago
@egamer/ow-events-status-element v1.0.0
ow-events-status-element
This is a custom element (web components - can be used every where regardless the framework) built with Svelte to indicate game events status.
Provided by eGamer.gg
Usage
gameid - OW game id.
polling - fetch events status every X ms.
<ow-events-status-element gameid="10906">
<div slot="green">
😎
</div>
</ow-events-status-element><!-- polling status every 10 minutes -->
<ow-events-status-element gameid="10906" polling="600000">
<div slot="red">
😕
</div>
</ow-events-status-element>Available slots:
loading- loading events status from OW APIunsupported- game id is not support by OWgreen- events are up and runningyellow- partial functionality, some game events may be unavailable.red- game events are unavailable.error- failed to load events status.
Examples:
TODO
- validate props types
- tests
- give indication for every event - flag