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.20
TRX 0.19
JST 0.034
BTC 88638.48
ETH 3290.10
USDT 1.00
SBD 3.05