ImpSdk.getRatings

developed by Ramu Katamaneni
Name Description
getRatings SDK for Getting Rating/Voting results.

Demonstration:

getRatings()
input properties
requestdata: object The input data as json, ex: {entrytype:"recipe", entryids:[4456,6748]} OR {entrytype:"recipe", limit:20, order:"desc"}
callback: function Callback function to be called when Get Ratings response is ready.
output properties
callback: function Callback function is returned with Error and Data( Ex: callback(error, responsedata) )
error: Error Error object with error details( For success: it is null )
responsedata: object Data object in JSON format with rating details( Ex: [{entrytype:"recipe", entryid:4456, votes:63, average:3.5, weightedaverage:4}, {entrytype:"recipe", entryid:6748, votes:45, average:4.2, weightedaverage:3}]). The weighted average will decay the influence of a vote based on its age.