From e49e35203fd4a83997f848cc6cc7b86c43dda976 Mon Sep 17 00:00:00 2001 From: Ash Keel Date: Wed, 5 Apr 2023 18:12:55 +0200 Subject: [PATCH] add info for 3rd party extensions --- content/guide/features/loyalty-system.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/guide/features/loyalty-system.md b/content/guide/features/loyalty-system.md index 8cf0f90..7874e94 100644 --- a/content/guide/features/loyalty-system.md +++ b/content/guide/features/loyalty-system.md @@ -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. {{< 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/`](/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)