Suggestion: Adding follow, unfollow, has_followed in Steem Python Library
I have searched the library of steemit/steem-python, the official Steem Python library, in order to find methods that allow me to follow, unfollow or check if followed given a steem ID. Currently, there is no relative methods in steemit/steem-python librarys.
The closest methods are only read-only the lists. For example, in Account.py:
https://github.com/steemit/steem-python/blob/master/steem/account.py
The get_following is defined as:
def get_following(self):
return [x['following'] for x in self._get_followers(direction="following")]
So, what I am proposing is to add follow, unfollow and has_followed methods that are self-explanatory. Example usage (in Python code) will be something like this:
account = Account("justyy")
if not account.has_followed("utopian-io"):
account.follow("utopian-io")
if account.has_followed("ned"):
account.unfollow("ned")
Posted on Utopian.io - Rewarding Open Source Contributors
nice job dude. keep it up..ur posts are valuable for all.thnx :)
Hello @justyy, your contribution can not be approved yet as it contains direct mentioning of other accounts. I recommend that you use markdown to hide the mentions (e.g
@ned, @justyyetc ). Please kindly edit your contribution to reapply for approval. thank you :)[utopian-moderator]
Thanks, removed mentioning, please could you check.
Approved
Hey @justyy I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x