beem.comment

class beem.comment.Comment(authorperm, full=True, lazy=False, steem_instance=None)

Bases: beem.blockchainobject.BlockchainObject

Read data about a Comment/Post in the chain

Parameters:
  • authorperm (str) – perm link to post/comment
  • steem_instance (steem) – Steem() instance to use when accesing a RPC
author
authorperm
body
category
delete(account=None, identifier=None)

Delete an existing post/comment

Parameters:
  • identifier (str) – Identifier for the post to upvote Takes the form @author/permlink
  • account (str) – Voter to use for voting. (Optional)

If voter is not defines, the default_account will be taken or a ValueError will be raised

downvote(weight=-100, voter=None)

Downvote the post

Parameters:
  • weight (float) – (optional) Weight for posting (-100.0 - +100.0) defaults to -100.0
  • voter (str) – (optional) Voting account
edit(body, meta=None, replace=False)

Edit an existing post

Parameters:
  • body (str) – Body of the reply
  • meta (json) – JSON meta object that can be attached to the post. (optional)
  • replace (bool) – Instead of calculating a diff, replace the post entirely (defaults to False)
get_reblogged_by(identifier=None)
get_votes()
id
is_comment()

Retuns True if post is a comment

is_main_post()

Retuns True if main post, and False if this is a comment (reply).

json()
json_metadata
parent_author
refresh()
reply(body, title='', author='', meta=None)

Reply to an existing post

Parameters:
  • body (str) – Body of the reply
  • title (str) – Title of the reply post
  • author (str) – Author of reply (optional) if not provided default_user will be used, if present, else a ValueError will be raised.
  • meta (json) – JSON meta object that can be attached to the post. (optional)
resteem(identifier=None, account=None)

Resteem a post

Parameters:
  • identifier (str) – post identifier (@<account>/<permlink>)
  • account (str) – (optional) the account to allow access to (defaults to default_account)
title
type_id = 8
upvote(weight=100, voter=None)

Upvote the post

Parameters:
  • weight (float) – (optional) Weight for posting (-100.0 - +100.0) defaults to +100.0
  • voter (str) – (optional) Voting account
vote(weight, account=None, identifier=None, **kwargs)

Vote for a post

Parameters:
  • identifier (str) – Identifier for the post to upvote Takes the form @author/permlink
  • weight (float) – Voting weight. Range: -100.0 - +100.0. May not be 0.0
  • account (str) – Voter to use for voting. (Optional)

If voter is not defines, the default_account will be taken or a ValueError will be raised

class beem.comment.RecentByPath(path='promoted', category=None, steem_instance=None)

Bases: list

Obtain a list of votes for an account

Parameters:
  • account (str) – Account name
  • steem_instance (steem) – Steem() instance to use when accesing a RPC
class beem.comment.RecentReplies(author, skip_own=True, steem_instance=None)

Bases: list

Obtain a list of recent replies

Parameters:
  • author (str) – author
  • steem_instance (steem) – Steem() instance to use when accesing a RPC