Skip to content
Snippets Groups Projects
Commit 41a72109 authored by Holger's avatar Holger
Browse files

Fix more documentation

parent 0b8f54e1
No related branches found
No related tags found
No related merge requests found
...@@ -28,20 +28,18 @@ class Conveyor(object): ...@@ -28,20 +28,18 @@ class Conveyor(object):
Description from the official documentation: Description from the official documentation:
* Feature flags: "Feature flags allows our apps (condenser mainly) to * Feature flags: "Feature flags allows our apps (condenser mainly) to
hide certain features behind flags." hide certain features behind flags."
* User data: "Conveyor is the central point for storing sensitive user * User data: "Conveyor is the central point for storing sensitive user
data (email, phone, etc). No other services should store this data data (email, phone, etc). No other services should store this data
and should instead query for it here every time." and should instead query for it here every time."
* User tags: "Tagging mechanism for other services, allows defining and * User tags: "Tagging mechanism for other services, allows defining and
assigning tags to accounts (or other identifiers) and querying for assigning tags to accounts (or other identifiers) and querying for
them." them."
Not contained in the documentation, but implemented and working: Not contained in the documentation, but implemented and working:
* Draft handling: saving, listing and removing post drafts * Draft handling: saving, listing and removing post drafts
consisting of a post title and a body. consisting of a post title and a body.
The underlying RPC authentication and request signing procedure is The underlying RPC authentication and request signing procedure is
described here: https://github.com/steemit/rpc-auth described here: https://github.com/steemit/rpc-auth
...@@ -159,7 +157,7 @@ class Conveyor(object): ...@@ -159,7 +157,7 @@ class Conveyor(object):
from beem import Steem from beem import Steem
from beem.conveyor import Conveyor from beem.conveyor import Conveyor
s = Steem(keys=[5JPOSTINGKEY]) s = Steem(keys=["5JPOSTINGKEY"])
c = Conveyor(steem_instance=s) c = Conveyor(steem_instance=s)
print(c.get_user_data('accountname')) print(c.get_user_data('accountname'))
...@@ -184,7 +182,7 @@ class Conveyor(object): ...@@ -184,7 +182,7 @@ class Conveyor(object):
from beem import Steem from beem import Steem
from beem.conveyor import Conveyor from beem.conveyor import Conveyor
s = Steem(keys=[5JADMINPOSTINGKEY]) s = Steem(keys=["5JADMINPOSTINGKEY"])
c = Conveyor(steem_instance=s) c = Conveyor(steem_instance=s)
userdata = {'email': 'foo@bar.com', 'phone':'+123456789'} userdata = {'email': 'foo@bar.com', 'phone':'+123456789'}
c.set_user_data('accountname', userdata, 'adminaccountname') c.set_user_data('accountname', userdata, 'adminaccountname')
...@@ -208,7 +206,7 @@ class Conveyor(object): ...@@ -208,7 +206,7 @@ class Conveyor(object):
from beem import Steem from beem import Steem
from beem.conveyor import Conveyor from beem.conveyor import Conveyor
s = Steem(keys=[5JPOSTINGKEY]) s = Steem(keys=["5JPOSTINGKEY"])
c = Conveyor(steem_instance=s) c = Conveyor(steem_instance=s)
print(c.get_feature_flags('accountname')) print(c.get_feature_flags('accountname'))
...@@ -233,7 +231,7 @@ class Conveyor(object): ...@@ -233,7 +231,7 @@ class Conveyor(object):
from beem import Steem from beem import Steem
from beem.conveyor import Conveyor from beem.conveyor import Conveyor
s = Steem(keys=[5JPOSTINGKEY]) s = Steem(keys=["5JPOSTINGKEY"])
c = Conveyor(steem_instance=s) c = Conveyor(steem_instance=s)
print(c.get_feature_flag('accountname', 'accepted_tos')) print(c.get_feature_flag('accountname', 'accepted_tos'))
......
...@@ -110,6 +110,22 @@ class Steem(object): ...@@ -110,6 +110,22 @@ class Steem(object):
>>> print(steem.get_blockchain_version()) # doctest: +SKIP >>> print(steem.get_blockchain_version()) # doctest: +SKIP
This class also deals with edits, votes and reading content. This class also deals with edits, votes and reading content.
Example for adding a custom chain:
.. code-block:: python
from beem import Steem
stm = Steem(node=["https://mytstnet.com"], custom_chains={"MYTESTNET":
{'chain_assets': [{'asset': 'SBD', 'id': 0, 'precision': 3, 'symbol': 'SBD'},
{'asset': 'STEEM', 'id': 1, 'precision': 3, 'symbol': 'STEEM'},
{'asset': 'VESTS', 'id': 2, 'precision': 6, 'symbol': 'VESTS'}],
'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01674',
'min_version': '0.0.0',
'prefix': 'MTN'}
}
)
""" """
def __init__(self, def __init__(self,
...@@ -592,6 +608,7 @@ class Steem(object): ...@@ -592,6 +608,7 @@ class Steem(object):
""" Return witness elected chain properties """ Return witness elected chain properties
Properties::: Properties:::
{ {
'account_creation_fee': '30.000 STEEM', 'account_creation_fee': '30.000 STEEM',
'maximum_block_size': 65536, 'maximum_block_size': 65536,
......
...@@ -101,7 +101,7 @@ Receive all Blocks from the Blockchain ...@@ -101,7 +101,7 @@ Receive all Blocks from the Blockchain
from beem.blockchain import Blockchain from beem.blockchain import Blockchain
blockchain = Blockchain() blockchain = Blockchain()
for op in Blockchain.ops(): for op in blockchain.stream():
print(op) print(op)
Access one Block Access one Block
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment