Forum Discussion

matth's avatar
12 years ago

Find TKB contributions for user via REST API

Hi,

Does anyone know if it's possible to retrieve the number of KB contributions a user has made via API? 

I'd like to display this in the User's message postbit...

 

Under Posts, Solutions, Kudos, also show "Contributions: " 

But I can't seem to find this value in the API docs.

 

<#assign authorKudos = rest("users/id/${author.id}/kudos/received/count").value />
<#assign authorSolutions = rest("users/id/${author.id}/solutions/received/count").value />
<#assign authorPosts = rest("users/id/${author.id}/posts/count").value />
<#assign authorDate = rest("users/id/${author.id}/registration_time").value />

 

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)

    Will these users be the author of the TKB aritcle?

    • matth's avatar
      matth
      Ace

      Good question...

       

      I'm not sure yet if I only want this to be if they were the original author, or just a contributing author (someone that edited an already existing article). 

       

      • KaelaC's avatar
        KaelaC
        Lithium Alumni (Retired)
        if they were the author you could get that information from metrics

        /restapi/vc/users/id/[user id]/metrics/name/tkb_articles