-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing get_follow_count #10
Comments
That's because
|
client.call('follow_api', 'get_following', ['sweetsssj']).then(console.log)
edit: Tried again, this is the code that worked: client.call('follow_api', 'get_following', ['sweetsssj', '', 'blog', 100]) I tried using 1000 (like the Steemit website does in its ajax post call) but I got edit2: There seems to be no pagination, so I can only get the first 100 followers of any account unless I scrape it out of Steemit... I did not realize that when I made this: const get100 = accountName =>
client.call('follow_api', 'get_following', [accountName, '', 'blog', 100])
const getAllFollowing = (accountName, accumulator) =>
!accumulator || accumulator.length % 100 === 0
? get100(accountName, accumulator).then(r =>
getAllFollowing(accountName, accumulator ? accumulator.concat(r) : r))
: Promise.resolve(accumulator)
getAllFollowing('sweetsssj').then(console.log) Now I have an array of the first 100 followers over and over... |
Many steemd api's are paged by partial string matching, so passing |
SteemJS has the function steem.api.getFollowCount which is missing with dsteem.
I've tried
client.database.call('get_follow_count', [ name ] )
but get the following error:Main Error itr != _by_name.end(): no method with name 'get_follow_count
Would be amazing if you could fix this or tell me if I made a mistake :)
The text was updated successfully, but these errors were encountered: