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

'promoted' category not present in 'sort' param of 'get_post' function

Open pandya-hiren-a opened this issue 8 years ago • 0 comments

While executing following function, steem.get_posts(limit=self.no_of_post, sort="promoted", category=self.cat_c) I got following exception raise Exception("Invalid choice of '--sort'!")

Looking into the code, I came across following observation get_post function supports parameter sort which is being checked against following list

if sort not in ["trending", "created", "active", "cashout",
                        "payout", "votes", "children", "hot"]:

'promoted' is not present in the list while get_discussions_by_promoted( ) is already present further in the code. Is there a specific reason why 'promoted' is not included in the list?

pandya-hiren-a avatar Aug 25 '17 14:08 pandya-hiren-a