Skip to content

Commit

Permalink
feat: Forum_detail.small_avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
lumina37 committed Jul 17, 2023
1 parent 327af66 commit b689f11
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion aiotieba/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.5.1a1"
__version__ = "3.5.1"
16 changes: 14 additions & 2 deletions aiotieba/api/get_forum_detail/_classdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class Forum_detail(object):
fid (int): 贴吧id
fname (str): 贴吧名
origin_avatar (str): 吧头像原图
small_avatar (str): 吧头像(小)
origin_avatar (str): 吧头像(原图)
slogan (str): 吧标语
member_num (int): 吧会员数
post_num (int): 发帖量
Expand All @@ -22,6 +23,7 @@ class Forum_detail(object):
__slots__ = [
'_fid',
'_fname',
'_small_avatar',
'_origin_avatar',
'_slogan',
'_member_num',
Expand All @@ -34,6 +36,7 @@ def __init__(self, data_proto: Optional[TypeMessage] = None) -> None:
forum_proto = data_proto.forum_info
self._fid = forum_proto.forum_id
self._fname = forum_proto.forum_name
self._small_avatar = forum_proto.avatar
self._origin_avatar = forum_proto.avatar_origin
self._slogan = forum_proto.slogan
self._member_num = forum_proto.member_count
Expand All @@ -42,6 +45,7 @@ def __init__(self, data_proto: Optional[TypeMessage] = None) -> None:
else:
self._fid = 0
self._fname = ''
self._small_avatar = ''
self._origin_avatar = ''
self._slogan = ''
self._member_num = 0
Expand Down Expand Up @@ -74,10 +78,18 @@ def fname(self) -> str:

return self._fname

@property
def small_avatar(self) -> str:
"""
吧头像(小)
"""

return self._small_avatar

@property
def origin_avatar(self) -> str:
"""
吧头像原图
吧头像(原图)
"""

return self._origin_avatar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ message GetForumDetailResIdl {
Error error = 1;
message DataRes {
message RecommendForumInfo {
string avatar = 1;
uint64 forum_id = 2;
string forum_name = 3;
uint32 member_count = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ..._protobuf import Error_pb2 as Error__pb2

DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x1aGetForumDetailResIdl.proto\x1a\x0b\x45rror.proto\"\xb6\x03\n\x14GetForumDetailResIdl\x12\x15\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x06.Error\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.GetForumDetailResIdl.DataRes\x1a\xd9\x02\n\x07\x44\x61taRes\x12\x44\n\nforum_info\x18\x01 \x01(\x0b\x32\x30.GetForumDetailResIdl.DataRes.RecommendForumInfo\x12\x46\n\x0c\x65lection_tab\x18\x08 \x01(\x0b\x32\x30.GetForumDetailResIdl.DataRes.ManagerElectionTab\x1a\x8d\x01\n\x12RecommendForumInfo\x12\x10\n\x08\x66orum_id\x18\x02 \x01(\x04\x12\x12\n\nforum_name\x18\x03 \x01(\t\x12\x14\n\x0cmember_count\x18\x05 \x01(\r\x12\x14\n\x0cthread_count\x18\x06 \x01(\r\x12\x0e\n\x06slogan\x18\x07 \x01(\t\x12\x15\n\ravatar_origin\x18\x14 \x01(\t\x1a\x30\n\x12ManagerElectionTab\x12\x1a\n\x12new_manager_status\x18\x04 \x01(\rb\x06proto3'
b'\n\x1aGetForumDetailResIdl.proto\x1a\x0b\x45rror.proto\"\xc6\x03\n\x14GetForumDetailResIdl\x12\x15\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x06.Error\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.GetForumDetailResIdl.DataRes\x1a\xe9\x02\n\x07\x44\x61taRes\x12\x44\n\nforum_info\x18\x01 \x01(\x0b\x32\x30.GetForumDetailResIdl.DataRes.RecommendForumInfo\x12\x46\n\x0c\x65lection_tab\x18\x08 \x01(\x0b\x32\x30.GetForumDetailResIdl.DataRes.ManagerElectionTab\x1a\x9d\x01\n\x12RecommendForumInfo\x12\x0e\n\x06\x61vatar\x18\x01 \x01(\t\x12\x10\n\x08\x66orum_id\x18\x02 \x01(\x04\x12\x12\n\nforum_name\x18\x03 \x01(\t\x12\x14\n\x0cmember_count\x18\x05 \x01(\r\x12\x14\n\x0cthread_count\x18\x06 \x01(\r\x12\x0e\n\x06slogan\x18\x07 \x01(\t\x12\x15\n\ravatar_origin\x18\x14 \x01(\t\x1a\x30\n\x12ManagerElectionTab\x12\x1a\n\x12new_manager_status\x18\x04 \x01(\rb\x06proto3'
)

_globals = globals()
Expand All @@ -19,10 +19,10 @@
if _descriptor._USE_C_DESCRIPTORS is False:
DESCRIPTOR._options = None
_globals['_GETFORUMDETAILRESIDL']._serialized_start = 44
_globals['_GETFORUMDETAILRESIDL']._serialized_end = 482
_globals['_GETFORUMDETAILRESIDL']._serialized_end = 498
_globals['_GETFORUMDETAILRESIDL_DATARES']._serialized_start = 137
_globals['_GETFORUMDETAILRESIDL_DATARES']._serialized_end = 482
_globals['_GETFORUMDETAILRESIDL_DATARES']._serialized_end = 498
_globals['_GETFORUMDETAILRESIDL_DATARES_RECOMMENDFORUMINFO']._serialized_start = 291
_globals['_GETFORUMDETAILRESIDL_DATARES_RECOMMENDFORUMINFO']._serialized_end = 432
_globals['_GETFORUMDETAILRESIDL_DATARES_MANAGERELECTIONTAB']._serialized_start = 434
_globals['_GETFORUMDETAILRESIDL_DATARES_MANAGERELECTIONTAB']._serialized_end = 482
_globals['_GETFORUMDETAILRESIDL_DATARES_RECOMMENDFORUMINFO']._serialized_end = 448
_globals['_GETFORUMDETAILRESIDL_DATARES_MANAGERELECTIONTAB']._serialized_start = 450
_globals['_GETFORUMDETAILRESIDL_DATARES_MANAGERELECTIONTAB']._serialized_end = 498

0 comments on commit b689f11

Please sign in to comment.