Live Coding Javascript Steem-js

in livecoding •  7 years ago  (edited)

Hey everyone. I'm going live right now!

I'm going to be making changes to some examples in the steem-js api.

Thanks for following and enjoy.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

You got a 7.91% upvote from @buildawhale courtesy of @r351574nc3!
If you believe this post is spam or abuse, please report it to our Discord #abuse channel.

If you want to support our Curation Digest or our Spam & Abuse prevention efforts, please vote @themarkymark as witness.

Hey! I've been following your tutorials! Great content... thank you so much for helping devleopers gets aquanited with the steem-js API

I have a quick question about steem-js:

Does anyone know how to obtain the tags used by a spcefic account? I noticed with the API call for 'getAccounts' there is an array called 'tags_usage'; however, for every account I look at the array is empty... 'tags_usage: []'.

There are a lot of fields like that. They were used at one point, but are deprecated now and no longer contain the data you need. I recommend using account history. https://utopian.io/utopian-io/@r351574nc3/tutorial-viewing-steemit-account-history

You will want to

  1. iterate through the history for commentoperation.
  2. look for json_metadata for each comment
  3. Pull tags from json_metadata. Here's an example of json_metadata.
operations: [
    [ "comment",
        {
            "json_metadata": "{ \"tags\": [ \"blog\" ], \"app\": \"steemit/1.0\" }"
        }
    ]
]

Hope that helps.

Wow, thank you so much! I will be doing some coding tonight and will let you know how it goes!