Skip to content
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

Database API get_account add follower/following count #692

Closed
bonustrack opened this issue Dec 11, 2016 · 3 comments
Closed

Database API get_account add follower/following count #692

bonustrack opened this issue Dec 11, 2016 · 3 comments

Comments

@bonustrack
Copy link

Is that possible that the method "get_account" from the database API return following_count and follower_count? Actually to get this information it require multiple get_followers requests, it retrieve followers 100 by 100 but not seem to be scalable solution to get the follower/following count.

image

@svk31
Copy link

svk31 commented Dec 12, 2016

v0.16.0 introduced a new method get_follow_count that gives you the number of followers/following directly for a given account.

follow_count_api_obj get_follow_count( string account )const;

@bonustrack
Copy link
Author

Amazing! Thank you Sigve!

I think we would also need a method has_follow. If we dont want to do a get_follower loop to know if you've already followed someone or not.

@svk31
Copy link

svk31 commented Dec 12, 2016

No problem. I believe there are plans to address things like getting follower data, but at least with this new method you can delay fetching all the followers until actually needed, and has_follow you can do by simply calling get_followers/get_following with the account in question.

@svk31 svk31 closed this as completed Dec 12, 2016
bitphage pushed a commit to VIZ-Blockchain/viz-cpp-node that referenced this issue Jun 7, 2018
1. Remove unused (old) objects and methods
2. Remove fields from api_account_object
3. Comment unused code from disabled reset_ operations
4. Fix STEEMIT_VESTING_WITHDRAW_INTERVAL_SECONDS in testnet
5. Some code style fixes
bitphage pushed a commit to VIZ-Blockchain/viz-cpp-node that referenced this issue Jun 7, 2018
bitphage pushed a commit to VIZ-Blockchain/viz-cpp-node that referenced this issue Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants