diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c51731b1db8eecbab98bd53e4a7316f738250a54..61f8007f4b89a00012bce61f806daa7fad9518f0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ Changelog * Fix several unit tests * Fix deprecated collections import * Fix more HIVE/HBD symbols in beempy for HIVE +* Add information about HIVE in the documentation 0.22.10 ------- diff --git a/docs/index.rst b/docs/index.rst index 3b4ba38344392fbf3e366b94a0d18a56f548c242..047b5db90bc62faa6d605708e47a938822cdd973 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,18 +17,18 @@ Welcome to beem's documentation! ================================ -Steem is a blockchain-based rewards platform for publishers to monetize +Steem/Hive is a blockchain-based rewards platform for publishers to monetize content and grow community. It is based on *Graphene* (tm), a blockchain technology stack (i.e. software) that allows for fast transactions and ascalable blockchain -solution. In case of Steem, it comes with decentralized publishing of +solution. In case of Steem/Hive, it comes with decentralized publishing of content. The beem library has been designed to allow developers to easily access its routines and make use of the network without dealing with all the related blockchain technology and cryptography. This library can be -used to do anything that is allowed according to the Steem +used to do anything that is allowed according to the Steem/Hive blockchain protocol. diff --git a/docs/quickstart.rst b/docs/quickstart.rst index eefdc0d5af004a779d8b0993b7c6e12570018b31..43b156f9c8313591e7169186edc5389c026257a1 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -1,9 +1,50 @@ Quickstart ========== +Hive/Steem blockchain +--------------------- + +Nodes for using beem with the Hive blockchain can be set by the command line tool with: + +.. code-block:: bash + + beempy updatenodes --hive + +Nodes for the Steem blockchain are set with + +.. code-block:: bash + + beempy updatenodes + + +Hive nodes can be set in a python script with + +.. code-block:: python + + from beem import Steem + from beem.nodelist import NodeList + nodelist = NodeList() + nodelist.update_nodes() + nodes = nodelist.get_nodes(hive=True) + hive = Steem(node=nodes) + print(hive.is_hive) + +Steem nodes can be set in a python script with + +.. code-block:: python + + from beem import Steem + from beem.nodelist import NodeList + nodelist = NodeList() + nodelist.update_nodes() + nodes = nodelist.get_nodes(hive=False) + hive = Steem(node=nodes) + print(hive.is_hive) + + Steem ----- -The steem object is the connection to the Steem blockchain. +The steem object is the connection to the Steem/Hive blockchain. By creating this object different options can be set. .. note:: All init methods of beem classes can be given diff --git a/tests/beem/test_cli.py b/tests/beem/test_cli.py index 49d4c46e2c8d680b2c49dd1289f368bc574c2736..4f25e156a8ade9eb191ece0d4efcb6604bfdbdc8 100644 --- a/tests/beem/test_cli.py +++ b/tests/beem/test_cli.py @@ -410,7 +410,7 @@ class Testcases(unittest.TestCase): account_name = "fullnodeupdate" result = runner.invoke(cli, ['pending', account_name]) self.assertEqual(result.exit_code, 0) - result = runner.invoke(cli, ['pending', '--post', '--comment', '--curation', account_name]) + result = runner.invoke(cli, ['pending', '--post', '--comment', account_name]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ['pending', '--post', '--comment', '--curation', '--permlink', '--days', '1', account_name]) self.assertEqual(result.exit_code, 0) diff --git a/tests/beem/test_comment.py b/tests/beem/test_comment.py index 35043b80a108fe2b3daea1aef53401d3e148854a..b5021bfb52470803cf30da46fa68547d030e3f1b 100644 --- a/tests/beem/test_comment.py +++ b/tests/beem/test_comment.py @@ -21,8 +21,8 @@ class Testcases(unittest.TestCase): @classmethod def setUpClass(cls): nodelist = NodeList() - nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_nodes(exclude_limited=False), num_retries=10)) - node_list = nodelist.get_nodes(exclude_limited=True) + nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_nodes(hive=True), num_retries=10)) + node_list = nodelist.get_nodes(hive=True) cls.bts = Steem( node=node_list, @@ -39,8 +39,8 @@ class Testcases(unittest.TestCase): keys={"active": wif}, num_retries=10 ) - acc = Account("holger80", steem_instance=cls.bts) - comment = acc.get_feed(limit=20)[-1] + acc = Account("fullnodeupdate", steem_instance=cls.bts) + comment = Comment(acc.get_blog_entries(limit=5)[-1], steem_instance=cls.bts) cls.authorperm = comment.authorperm [author, permlink] = resolve_authorperm(cls.authorperm) cls.author = author diff --git a/tests/beem/test_vote.py b/tests/beem/test_vote.py index 9a61fe436f37e484e6169f9b6ddd3de71b8940f7..9b8b4a4c6fb010cb904c159be9925cd0bf934744 100644 --- a/tests/beem/test_vote.py +++ b/tests/beem/test_vote.py @@ -35,11 +35,12 @@ class Testcases(unittest.TestCase): set_shared_steem_instance(cls.bts) cls.bts.set_default_account("test") - acc = Account("holger80", steem_instance=cls.bts) + acc = Account("fullnodeupdate", steem_instance=cls.bts) n_votes = 0 index = 0 + entries = acc.get_blog_entries(limit=30)[::-1] while n_votes == 0: - comment = acc.get_feed(limit=30)[::-1][index] + comment = Comment(entries[index], steem_instance=cls.bts) votes = comment.get_votes() n_votes = len(votes) index += 1