You are viewing a single comment's thread from:

RE: Creating First Steemit Bot

in #steemit7 years ago

This is one way to do it:

<html>
    <head>
        <script src="https://cdn.steemjs.com/lib/latest/steem.min.js"></script>
        <script>
            steem.api.getAccounts(['aamirijaz','money-dreamer'], function(err, response){
                console.log(err, response);
                for (var i = response.length - 1; i >= 0; i--) {
                    let newAccount = "<div>Hello " + response[i]['name'] + "<br>You have " + response[i]['balance'] + ".<br>Account birthday is " + response[i]['created'] + "</div><hr>";
                    document.getElementById("name").innerHTML += newAccount;
                }
            });
        </script>
    </head>
    <body>
        <div id="name"></div>
    </body>
</html>

Sort:  

I am so grateful to you! Thanks a lot.

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.028
BTC 63033.54
ETH 2434.49
USDT 1.00
SBD 2.54