1
0
Fork 0
mirror of https://git.sr.ht/~ashkeel/strimertul-website synced 2024-11-23 21:32:20 +00:00

add info for 3rd party extensions

This commit is contained in:
Ash Keel 2023-04-05 18:12:55 +02:00
parent 3379b73a70
commit e49e35203f
No known key found for this signature in database
GPG key ID: BAD8D93E7314ED3E

View file

@ -135,3 +135,15 @@ There are several shortcuts for this. You can use `!contribute POINTS` to contri
You can combine both by just using `!contribute` to contribute 100 points to the first available goal. You can combine both by just using `!contribute` to contribute 100 points to the first available goal.
{{< figure src="../media/loyalty/contribute-shortcut.png" class="guide-pic" alt="Using the !contribute shortcuts" >}} {{< figure src="../media/loyalty/contribute-shortcut.png" class="guide-pic" alt="Using the !contribute shortcuts" >}}
## External scripts and extensions
Like the rest of strimertül, the loyalty system uses Kilovolt keys for everything:
- Every viewer with points has a balance accessible at [`loyalty/points/<username>`](/api/v31/#loyaltypointsuser)
- All pending redeems are stored as an array at [`loyalty/redeem-queue`](/api/v31/#loyaltyredeem-queue)
- The list of all rewards to redeem can be found at [`loyalty/rewards`](/api/v31/#loyaltyrewards)
- The list of all goals is at [`loyalty/goals`](/api/v31/#loyaltygoals)
- To listen for new redeems, subscribe to [`loyalty/ev/new-redeem`](/api/v31/#loyaltyevnew-redeem)
- To create a new redeem, write to [`loyalty/@create-redeem`](/api/v31/#loyaltycreate-redeem)
- To remove a redeem from the queue, write to [`loyalty/@remove-redeem`](/api/v31/#loyaltyremove-redeem)