dustin
10 years agoExpert
Top Kudo Authors rest API in freemarker
After digging around the community, it seems it is possible to get a list of the top kudoed authors for the last week...
http://lithosphere.lithium.com/lithium/restapi/vc/kudos/authors/leaderboard?max_age=one_month
I would like to access this via freemarker, and need help getting it to work. This is my best guess, but alas it does not work. Any ideas what I'm doing wrong?
<#assign authors = rest("/kudos/authors/leaderboard?max_age=one_week").authors /> <#list authors as author> <div>${author.id}</div> </#list>
dustin - Here you go:
<#assign authors = rest("/kudos/authors/leaderboard?max_age=one_week").users /> <#list authors.user as author> <div>${author.id}</div> </#list>
You need to hit the root node, there was no author node, but the user node for this. I hope this helps.