update for beem: changes regarding HF24

@holger80 · 2020-10-14 20:47 · hive-139531

Repository

https://github.com/holgern/beem

beem-logo

beem is a python library and command line tool for HIVE. The current version is 0.24.13.

There is also a discord channel for beem: https://discord.gg/4HM592V

The newest beem version can be installed by:

pip install -U beem

Check that you are using hive nodes. The following command

beempy updatenodes --hive

updates the nodelist and uses only hive nodes. After setting hive as default_chain, beempy updatenodes can be used.

The list of nodes can be checked with

beempy config

and

beempy currentnode

shows the currently connected node.

Changelog for versions 0.24.13

  • Add new node (https://hive-api.arcange.eu)
  • Fix logic in RankedPosts and AccountPosts
  • Fix feed_publish

Changelog for versions 0.24.12

  • Fix beempy witnessfeed for HF24
  • Fix more hbd renaming in beempy
  • improved RankedPosts class
  • New AccountPosts class for account feed and more
  • Comment class has been cleaned up, use_tags_api has been replaced by api
  • Add check if get_account_votes is still supported (is dropped in HF24)
  • New SupportedByHivemind exception has been added
  • Fix issue #263

Changelog for versions 0.24.11

  • assumes that an rpc server uses appbase

Congratulations we are on HF24

There were a lot of changes and bug fixes necessary and hopefully beem is running now smoth on HF24. Please open an issue on https://github.com/holgern/beem/issues, when you find something is not working.

Important changes in HF24

parent_permlink and parent_author

Both parameters from a comment are not existent in HF24 when the comment is a main post. You can use the property of the comment object instead.

from beem.comment import Comment
c = Comment("@holger80/update-for-beem-compatibility-issues-with-hf24-have-been-fixed")
print("parent_author" in c.json())
print("parent_permlink" in c.json())
print(c.parent_author)
print(c.parent_permlink)

returns

False
False
''
''

last_update in a comment

The last_update of a comment has become updated.

from beem.comment import Comment
c = Comment("@holger80/update-for-beem-compatibility-issues-with-hf24-have-been-fixed")
print(c["updated"])

returns a date:

2020-10-09 21:50:00+00:00

Outgoing votes are not available anymore

from beem.account import Account
acc = Account("holger80")
print(acc.get_account_votes())

returns

[]

The list_votes and find_votes rpc api call are not longer available.

This means also that

beempy pending --curation holger80

and

beempy votes --outgoing holger80

does not longer work.

New bridge api calls in beem

Beem uses now hivemind calls (bridge api) for receiving comments and information about feed, blog, trending, created, hot...

from beem.comment import RankedPosts
trending = RankedPosts("trending",)
hot = RankedPosts(sort="hot")
created = RankedPosts("created")
promoted = RankedPosts("promoted")
payout = RankedPosts("payout")
payout_comments = RankedPosts("payout_comments")
muted = RankedPosts("muted")
from beem.comment import AccountPosts
comments = AccountPosts("comments", "holger80")
blog = AccountPosts("blog", "holger80")
posts = AccountPosts("posts", "holger80")
replies = AccountPosts("replies", "holger80")
feed = AccountPosts("feed", "holger80")

If you like what I do, consider casting a vote for me as witness on Hivesigner or on PeakD

#development #beem #python #release
Payout: 0.000 HBD
Votes: 129
More interactions (upvote, reblog, reply) coming soon.