steem-js icon indicating copy to clipboard operation
steem-js copied to clipboard

How do I get the latest post of a certain user

Open eastmaels opened this issue 8 years ago • 4 comments

Expected behavior

I'm just starting to use steem-js, but basically what I want to happen is get the posts of a certain user and then eventually filter that to my latest post and then get the users who have voted for that post.

Actual behavior

How to reproduce

Environment information

eastmaels avatar Oct 10 '17 13:10 eastmaels

You can use steem.api.getDiscussionByBlog for get latest post from an user see example here: https://jsfiddle.net/bonustrack/b1fxacj9/3/

bonustrack avatar Oct 10 '17 16:10 bonustrack

Thanks for this. What are the values that can be passed in the 'query' parameter?

I mean from this, besides tag and limit, what others are possible? and where can I get more examples for it?

var query = {
	tag: 'sweetsssj',
  limit: 10
};

eastmaels avatar Oct 16 '17 09:10 eastmaels

You could also use the function getBlogEntries(account,entryid,limit,callback) steem.api.getBlogEntries("ajkapss", 9999, 1, function(err, data){ console.log(err, data); });

https://jsfiddle.net/hbknmpb7/15/

arjunkapur95 avatar Feb 24 '18 16:02 arjunkapur95

@bonustrack is it possible that tag can be a category?

potadibyo avatar Mar 15 '18 09:03 potadibyo