beem.comment module

class beem.comment.Comment(authorperm, full=False, 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 :param str identifier: Identifier for the post to upvote Takes

the form @author/permlink
Parameters: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 :param float weight: (optional) Weight for posting (-100.0 - +100.0) defaults to -100.0 :param str voter: (optional) Voting account

edit(body, meta=None, replace=False)

Edit an existing post :param str body: Body of the reply :param json meta: JSON meta object that can be attached to the

post. (optional)
Parameters: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 :param str body: Body of the reply :param str title: Title of the reply post :param str author: Author of reply (optional) if not provided

default_user will be used, if present, else a ValueError will be raised.
Parameters:meta (json) – JSON meta object that can be attached to the post. (optional)
resteem(identifier=None, account=None)

Resteem a post :param str identifier: post identifier (@<account>/<permlink>) :param str account: (optional) the account to allow access

to (defaults to default_account)
title
type_id = 8
upvote(weight=100, voter=None)

Upvote the post :param float weight: (optional) Weight for posting (-100.0 - +100.0) defaults to +100.0 :param str voter: (optional) Voting account

vote(weight, account=None, identifier=None, **kwargs)

Vote for a post :param str identifier: Identifier for the post to upvote Takes

the form @author/permlink
Parameters:
  • 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