When to use it
It shows only #1 above the chat room, collapsed. Tap it to expand the list up to #10.
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 ranking.
curl -X POST https://api.uchat.io/v2/rooms/room_xxxxxxxxxxxxxxxx/events \
-H "Authorization: Bearer uchat_..." \
-H "Content-Type: application/json" \
-d '{"plugin":"ranking","save":true,"data":["Top donors this week","Emma","50000","Olivia","30000","Noah","12000"]}'
dataorder: title, #1 name, #1 value, #2 name, #2 value, … (up to #10)- Save the whole list again each time the ranking changes. Set the value unit (won, points, etc.) in the settings.
- 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.