Forum Discussion

  • kandulmadhu - Seems like an incomplete documentation, please ask support for help. Though, there is one workaround which might help you for now.

     

    SELECT weight FROM kudos WHERE message.author.id = 'AUTHOR_ID'

     

    This will give you the weight for the users kudo, lmk if this helps.

    • kandulmadhu's avatar
      kandulmadhu
      Advisor

      Hi VarunGrazitti,

       

      Thanks for your reply.

      The V2 call you mentioned returns a list of all the kudos given by the user along with the weight as follows:

      {
      "status" : "success",
      "message" : "",
      "http_code" : 200,
      "data" : {
      "type" : "kudos",
      "list_item_type" : "kudo",
      "size" : 25,
      "items" : [ {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 15000
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      }, {
      "type" : "kudo",
      "weight" : 1
      } ]
      },
      "metadata" : { }
      }

       

      But, I just need the current kudo weight of the user that users sets in the Preferences tab.

      Is there any call for this?

       

      Regards,

      Madhu

       

      • VarunGrazitti's avatar
        VarunGrazitti
        Boss
        No, but you can limit this to 1, using LIMIT 1 and get the weight in the first node. As I mentioned earlier, this is a workaround, not the exact thing you are looking for.