You are viewing a single comment's thread from:

RE: 0000000000000100 - Steemit Interface PoC - Tag Cloud and Tidy Up

in Steemit Dev Group2 years ago

This looks very good! The Tag Cloud is very useful.
In our community Deutsch Unplugged we have also thought about a summary of the used tags. So far, however, I have not been able to find a suitable API (or SDS) function for its implementation. In the end, I would have solved this by looping through all community posts and collecting the tags.
It would be nice if you could briefly explain how you solved this.

Sort:  

I used steemchiller's API - getActiveCommunityPostsByCreated - and as you suggest, loop through the posts to get the tags (within the json_metadata). I store these in an array where the "key" is the tag and the "value" is a simple counter. I then sort the array alphabetically by key and output the HTML classes that I need for the varying tag sizes.

Yes, that's how I imagined it.
Especially for WOX there should be a large number of tags. You will also have to keep an eye on the data management and refresh rate.
So it's a good idea to limit the results, as you described in another comment. :-)

I'm currently displaying 25 posts per page and limiting my data grinding to 5,000 posts which is acceptably quick at the moment. I'm doing any asynchronous loading yet which would make the user experience much quicker I suspect. I'm glad it's a proof of concept as my code's becoming a mess already so I might have to tidy some of it up before going too much further!

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.030
BTC 67646.69
ETH 3790.48
USDT 1.00
SBD 3.50