Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
41a72109
Commit
41a72109
authored
6 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Fix more documentation
parent
0b8f54e1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
beem/conveyor.py
+10
-12
10 additions, 12 deletions
beem/conveyor.py
beem/steem.py
+17
-0
17 additions, 0 deletions
beem/steem.py
docs/quickstart.rst
+1
-1
1 addition, 1 deletion
docs/quickstart.rst
with
28 additions
and
13 deletions
beem/conveyor.py
+
10
−
12
View file @
41a72109
...
@@ -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
'
))
...
...
This diff is collapsed.
Click to expand it.
beem/steem.py
+
17
−
0
View file @
41a72109
...
@@ -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,
...
...
This diff is collapsed.
Click to expand it.
docs/quickstart.rst
+
1
−
1
View file @
41a72109
...
@@ -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
B
lockchain.
ops
():
for op in
b
lockchain.
stream
():
print(op)
print(op)
Access one Block
Access one Block
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment