This ticket supersedes #5341
The new wp.getCommentCount method provides the number of comments that have been approved, are awaiting moderation and have been marked as spam.
An optional post_id can be provided that will limit the comment numbers to just that post.
Example call to get comment count for entire blog:
wp.getCommentCount(blog_id, username, password)
Example call to get comment count for one post:
wp.getCommentCount(blog_id, username, password, post_id)
Example struct that is returned:
{
"approved" = 1;
"awaiting_moderation" = 7;
"spam" = 369;
}
I've contacted the author of the WordPress Comment Moderation Notifier and he's fine with adjusting his app to match our API.