The command for uploading ratings is '/Ratings' instead of '/Comments'. The JSON is different too, of course. In the code below, I don't write out the JSON manually, instead I construct a simple Rating object and use the JavascriptSerializer to convert it to JSON:
TcmUri tcmUri = new TcmUri(itemUri);
WSR_ContentDelivery.User user = new WSR_ContentDelivery.User { Id = GetUserId() };
WSR_ContentDelivery.Rating rating = new WSR_ContentDelivery.Rating
{
CreationDate = DateTime.UtcNow,
LastModifiedDate = DateTime.UtcNow,
ItemPublicationId = tcmUri.PublicationId,
ItemId = tcmUri.ItemId,
ItemType = tcmUri.ItemTypeId,
RatingValue = ratingValue.ToString(),
User = user,
Id = "0"
};
JavaScriptSerializer oSerializer = new JavaScriptSerializer();
WSClient.UploadString("/Ratings", "POST", "{d:" + oSerializer.Serialize(rating) + "}", GetUserId());