When to use it
It shows a donation goal bar at the very top of the chat room. If your server saves the amount each time it changes, people who join later also see how much has been raised so far.
Your external server sends values through the uchat API, and this plugin draws them. Turn on the plugin, get a key from the API menu on the admin page, and put it on your server.
How to send
Send a JSON body with the Authorization: Bearer {API key} header to POST https://api.uchat.io/v2/rooms/{API room ID}/events. plugin is donationGoal.
curl -X POST https://api.uchat.io/v2/rooms/room_xxxxxxxxxxxxxxxx/events \
-H "Authorization: Bearer uchat_..." \
-H "Content-Type: application/json" \
-d '{"plugin":"donationGoal","save":true,"data":["Weekend stream goal","120000","300000"]}'
dataorder: title, current amount, goal amount- Send amounts as numbers. When the amount passes the goal, "Goal reached!" is added.
- With
"save": true, the last value is saved, so people who join later get it when they enter. To take it down, save"data":[]. - It draws only values from the server API, and shows them as plain text.