def __init__( self, post, steem_instance=None, lazy=False ): self.steem = steem_instance or shared_steem_instance() self.loaded = False if isinstance(post, str): # From identifier parts = post.split("@") self.identifier = "@" + parts[-1] if not lazy: self.refresh() elif (isinstance(post, dict) and # From dictionary "author" in post and "permlink" in post): # strip leading @ if post["author"][0] == "@": post["author"] = post["author"][1:] self.identifier = constructIdentifier( post["author"], post["permlink"] ) if "created" in post: self._store_post(post) else: raise ValueError("Post expects an identifier or a dict " "with author and permlink!")
def __init__(self, witness, steem_instance=None, lazy=False): self.steem = steem_instance or shared_steem_instance() self.cached = False self.witness = witness if not lazy: self.refresh()
def __init__( self, post, steem_instance=None, lazy=False ): self.steem = steem_instance or shared_steem_instance() self.loaded = False if isinstance(post, str): # From identifier parts = post.split("@") self.identifier = "@" + parts[-1] if not lazy: self.refresh() elif (isinstance(post, dict) and # From dictionary "author" in post and "permlink" in post): # strip leading @ if post["author"][0] == "@": post["author"] = post["author"][1:] self.identifier = constructIdentifier( post["author"], post["permlink"] ) if "created" in post: self._store_post(post) else: raise ValueError("Post expects an identifier or a dict " "with author and permlink!")
def __init__(self, tx={}, steem_instance=None): self.steem = steem_instance or shared_steem_instance() self.op = [] self.wifs = [] if not isinstance(tx, dict): raise ValueError("Invalid TransactionBuilder Format") super(TransactionBuilder, self).__init__(tx)
def __init__(self, tx={}, steem_instance=None): self.steem = steem_instance or shared_steem_instance() self.op = [] self.wifs = [] if not isinstance(tx, dict): raise ValueError("Invalid TransactionBuilder Format") super(TransactionBuilder, self).__init__(tx)
def __init__(self, steem_instance=None, mode="irreversible"): self.steem = steem_instance or shared_steem_instance() if mode == "irreversible": self.mode = 'last_irreversible_block_num' elif mode == "head": self.mode = "head_block_number" else: raise ValueError("invalid value for 'mode'!")
def __init__(self, block, steem_instance=None, lazy=False): self.steem = steem_instance or shared_steem_instance() self.cached = False self.block = block if isinstance(block, Block): super(Block, self).__init__(block) self.cached = True elif not lazy: self.refresh()
def __init__( self, witness, steem_instance=None, lazy=False ): self.steem = steem_instance or shared_steem_instance() self.cached = False self.witness = witness if not lazy: self.refresh()
def __init__( self, steem_instance=None, mode="irreversible" ): self.steem = steem_instance or shared_steem_instance() if mode == "irreversible": self.mode = 'last_irreversible_block_num' elif mode == "head": self.mode = "head_block_number" else: raise ValueError("invalid value for 'mode'!")
def __init__( self, account_name, steem_instance=None, lazy=False, ): self.steem = steem_instance or shared_steem_instance() self.cached = False self.name = account_name # caches self._converter = None if not lazy: self.refresh()
def __init__( self, account_name, steem_instance=None, lazy=False, ): self.steem = steem_instance or shared_steem_instance() self.cached = False self.name = account_name # caches self._converter = None if not lazy: self.refresh()
def __init__( self, block, steem_instance=None, lazy=False ): self.steem = steem_instance or shared_steem_instance() self.cached = False self.block = block if isinstance(block, Block): super(Block, self).__init__(block) self.cached = True elif not lazy: self.refresh()
def __init__(self, steem_instance=None): self.steem = steem_instance or shared_steem_instance() # ensure market_history is registered self.steem.rpc.apis = list( set(self.steem.rpc.apis + ["market_history"])) self.steem.rpc.register_apis()
def __init__(self, steem_instance=None): self.steem = steem_instance or shared_steem_instance() self.CONTENT_CONSTANT = 2000000000000
def __init__(self, account_name, steem_instance=None): self.steem = steem_instance or shared_steem_instance() self.name = account_name self.refresh()
def __init__(self, steem_instance=None): self.steem = steem_instance or shared_steem_instance() # ensure market_history is registered self.steem.rpc.apis = list(set(self.steem.rpc.apis + ["market_history"])) self.steem.rpc.register_apis()
def __init__(self, account_name, steem_instance=None): self.steem = steem_instance or shared_steem_instance() self.name = account_name self.refresh()
def __init__(self, steem_instance=None): self.steem = steem_instance or shared_steem_instance()