How do you call the metric for "a logged in user's badge count, as shown on the "userbadgespage"
http://community.lithium.com/t5/badges/userbadgespage/user-id/46046/page/1
My attempt at this is
<#-- User Badge Count Variable <#assign badgeCount = rest("/users/login/${user.id?c}/profile/metric.net.badges").value /> -->
<a href="javascript:void(0);">You have ${badgeCount!""}</a>
@ryandewitt - Try this V2 call - select user_badges from users where id = '47'
The size returned is your number of badges.
I hope this helps.
Hi @VarunGrazitti ,
Is there a call that can give us a number of users with a certain number of badges.? For example we would like to find out how many users in the community have 16 or 5 badges for example.
Thanks!
This is very interesting looking forward to the answer from Varun.
This is what I got.
If you can grab "badge_count" and then set a "low_badge" Boolean
<#if rest("/users/id/" + user.id + "/profiles/name/badge_count").value == "">
<#assign low_badge=false>
<#else>
<#assign low_badge=true>
</#if>
Basically, Sounds like a If statement would solve this.
-ryandewitt
Welcome to the Technology board!
Curious about our platform? Looking to connect on social technology? You've come to the right place!