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.26
TRX 0.20
JST 0.038
BTC 96662.00
ETH 3660.13
USDT 1.00
SBD 3.84