Coline
10 years agoContributor
API call for badges
Hello,
Is there an API call we can use in order to create a board for badges?
(the last ones that have been earned for exemple)
Thanks!
Hello,
Is there an API call we can use in order to create a board for badges?
(the last ones that have been earned for exemple)
Thanks!
I don't think such call exist.
What you could try to do is to call the User Resource with our API v2, filtering by the last_visit time. And then check if the users returned have earned a badge during the same period of time (user/bageds/item/earned_date).
A better approach would be to go through your existing badge list with our API call.
And use the following optional parameter (badges.sort_order) to get the latest ones awarded (awarded_desc):
badges.sort_order (optional) | badges_sort_order | The order to sort the badges returned. Possible values are" creation_time_desc, creation_time_asc, activation_time_desc, activation_time_asc, position_desc, position_asc, title_asc, title_desc, awarded_asc, awarded_desc, qualified_asc, qualified_desc |
Using LiQL to fiddle around with a Badging leaderboard.
Any chance we can get this to work with Badges?
select user_badges.count(*) FROM users WHERE id = '2024'
I'm seeing this returned when I try:
"developer_message" : "Field 'user_badges.count(*)' does not exist for object 'users'.
Thanks!