From 98f198144434a3d39924a442935e85ffd3172371 Mon Sep 17 00:00:00 2001 From: furion <_@furion.me> Date: Wed, 19 Apr 2017 15:22:00 +0200 Subject: [PATCH] [community] custom_json id overloading --- hivetools/community.py | 5 +++-- setup.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hivetools/community.py b/hivetools/community.py index 394e9db65..43f075707 100644 --- a/hivetools/community.py +++ b/hivetools/community.py @@ -25,8 +25,9 @@ class Community: """ + _id = 'com.steemit.community' _roles = ['admin', 'moderator', 'poster'] - _valid_settings = ['name', 'about', 'description', 'language', 'nsfw'] + _valid_settings = ['title', 'about', 'description', 'language', 'is_nsfw'] def __init__(self, community_name: str, account_name: str, steem_instance: Steem = None, **kwargs): self.steem = steem_instance or Steem(**kwargs) @@ -132,7 +133,7 @@ class Community: **{'json': community_op, 'required_auths': [], 'required_posting_auths': [self.account], - 'id': 'com.steemit.community'}) + 'id': Community._id}) return self.steem.commit.finalizeOp(op, self.account, 'posting') def _op(self, action: str, **params): diff --git a/setup.py b/setup.py index b927b003e..a91f0ae8b 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ setup( 'pytest-console-scripts'], install_requires=[ + 'steem==0.18.1', 'maya', 'toolz', 'funcy', -- GitLab