ajkapss avatar

SteemAPI Tutorial Getting the latest post of a user?

ajkapss

Published: 24 Feb 2018 › Updated: 24 Feb 2018SteemAPI Tutorial Getting the latest post of a user?

SteemAPI Tutorial Getting the latest post of a user?

Hey Steemians In this post i going to show how we can use the steem API to get the latest post details of a specific user.
We are going to be using jsfiddle if you do not know how to use it i would suggest going to my last post

Apisssss.gif

There are a number of ways to get the users last post, we are going to be using the function

steem.api.getBlogEntries(account,entryid,limit,callback)

As you can see there are 4 parameter(account,entryid,limit,callback).So we can essentially get any single post from the users given we know the entry id for a given post.In this tutorial however i will use entryID as an arbitrary large number so as to get the last post from the user.

Parameter entry

  • account:ajkapss
  • entryid:9999
  • limit:1
  • Code Example

    
    steem.api.getBlogEntries("ajkapss", 9999, 1, function(err, data)
    {
        console.log(err, data[0]);
      var Author=document.createElement('li');
      Author.innerHTML=("Author name :"+data[0].author);
      var permLink=document.createElement('li');//also the title
      permLink.innerHTML=("PermLink :"+data[0].permlink);
      ul.appendChild(Author);
      ul.appendChild(permLink);
    });
    

    Here is the link to the jsfiddle page to view the code

    Leave SteemAPI Tutorial Getting the latest post of a user? to:

    Written by

    Programmer, Developer ,Computer Scientist

    Read more #steemtutorial posts


    Best Posts From ajkapss

    We have not curated any of ajkapss's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

    More Posts From ajkapss