'Watch' -ed numbers in api?
-
Being an admin, am I able to see what is the 'Watching' and/or 'Tracking' number of a particular category or tag? I looked around the doc and seems like we can't do this yet? Is there a workaround.
Thank you.
-
This is the typical response for /categories/. I don't think I am overlooking it lol
{ "status": { "code": "ok", "message": "OK" }, "response": { "cid": 0, "name": "string", "description": "string", "descriptionParsed": "string", "icon": "fa-comments-o", "bgColor": "string", "color": "string", "slug": "string", "parentCid": 0, "topic_count": 0, "post_count": 0, "disabled": 0, "order": 0, "link": "string", "numRecentReplies": 0, "class": "string", "imageClass": "auto", "isSection": 0, "minTags": 0, "maxTags": 0, "postQueue": 0, "totalPostCount": 0, "totalTopicCount": 0, "subCategoriesPerPage": 0, "backgroundImage": "string", "tagWhitelist": [ "string" ], "unread-class": "string" } }
-
I assume you want to see how many people are watching and/or tracking a category. This is not available in the API right now. You can use a plugin like https://community.nodebb.org/topic/15282/nodebb-plugin-db-explorer. It will let you count items in sorted sets. See below example, it shows how many people are tracking category 2 on this forum.
The min/max values can be from 1 to 4.
Categories.watchStates = { ignoring: 1, notwatching: 2, tracking: 3, watching: 4, };
-
That's great. I will tinker around this thing. Thanks man
Edit: Are there any plans to include this with api in future?
-
I see. Well, other than analytics, adding in api could be a good thing as it allows members to see how many people are watching a category or tag to tell how popular they are. Just another metrics to determine popularity rather than post views or upvotes.