How to get label usage count via REST?
We'd like to build a "label cloud." However, I'm not seeing how we can get a usage count of a particular label via the REST API. Is this possible? Has anyone had success building a cloud for labels? Thanks.
Hi xorrkaz,
The "posts" method on the Community object will give you a NodeMessageContext object:
http://lithosphere.lithium.com/restapi/vc/posts
The NodeMessageContext object can be handy for getting messages with a particluar label, for example:
http://lithosphere.lithium.com/restapi/vc/posts/for/labels/text/release%20notes
Once you have a NodeMessageContext object, there are many methods you can use, including the "count" method. For example:
http://lithosphere.lithium.com/restapi/vc/posts/for/labels/text/release%20notes/count
Hopefully this is what you're looking for. If not, let me know!
Regards,
Adam
From the index page, click "NodeMessageContext" link to pull up the listing for that class. The method I referenced is "for/labels/text/label_text"
If you're not seeing it in your copy of the JavaDocs, I'd recommend downloading the latest. The copy I'm referencing was generated: Fri Mar 30 02:31:04 PDT 2012