Forum Discussion

PerBonomi's avatar
10 years ago

Did current user kudo this post?

Hi there, I'm trying to use the API to find out if the current user already kudoed a post.

I know how to find the list of users who have kudoed a post, but some of our posts have 5000+ kudos (we don't use kudos weighting, so I need to look through a lot of records) and the api call is limited.

 

Help? :)

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    PerBonomi the problem is you can't use the AND operator in the WHERE clause for the kudo resource ...

     

    So it's either:

     

    SELECT * FROM kudos WHERE message.id='187'

     or:

     

    SELECT * FROM kudos WHERE user.id = '2'

     plus a loop in the results ...

     

    I can't think of anything more straight forward. Maybe other will do ...