Forum Discussion
Parshant
Boss
If you are facing issue with V2, you can use V1 API with below code to fetch online users count and user data.
For online users count:
<#assign OnlineUsersCount = restadmin('/users/online/registered/count').value />
For online users information:
<#assign OnlineUsers = restadmin('/users/online/registered').users />
and you can use "OnlineUsers" in list loop to get all the users related data.
Hope this helps.
jaread83
6 years agoChampion
The V1 api does not have all the information i need such as the rankname or avatar. In my previous version of my component it was performing a request on each item to get this information and and it would have too many requests and slow the pages down. V2 api has all the information i need without needing to do more requests within the loop.
Related Content
- 11 years ago
- 8 years ago
- 13 years ago
- 10 years ago