Forum Discussion

Henrik's avatar
Henrik
Advisor
11 years ago

REST - Kudos or ratings count for the current user in a specific board

Hi,

 

I'd like to have, for the current user, the count of kudos or ratings he gave in a board.

 

It is possible to do it for topics, replies or messages. For instance :

/users/id/[user_id]/topics/in/boards/id/[board_id]/count

 

Can we do the same for kudos and ratings?

 

Another possibility is to extract all kudos given by one user and to check for each of them if the message's board is correct. But this is really bad in terms of performance.

 

Any idea?

 

Thanks!

Henrik

2 Replies

  • Henrik's avatar
    Henrik
    Advisor
    11 years ago

    Hi Vishwajeet,

     

    Thanks for your answer.

     

    This API gives the members who gave kudos in the board. Do you mean I should make a loop on all givers and check if the current user is among them?

     

    I found another way to do it, meanwhile. We have a LOT of kudos per message, but few messages in our events' boards. So the idea is to make a loop on the messages and check if the user has already give a kudo with this API :

     

    /messages/id/[id]/kudos/for/users/self/count

     

    The same works for ratings.

     

    The loop breaks when a kudo has been found.

     

    Henrik