Skip to content

Commit

Permalink
Merge pull request #14 from djkcyl/main
Browse files Browse the repository at this point in the history
更新版本号
  • Loading branch information
SK-415 authored Mar 25, 2023
2 parents 55182c8 + 9aaadf8 commit e1f23f5
Show file tree
Hide file tree
Showing 229 changed files with 39,794 additions and 12,429 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ __pycache__
dist/
_test/
playground/
venv/

test_data.py
36 changes: 25 additions & 11 deletions bilireq/grpc/protos/bilibili/account/fission/v1/fission.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ service Fission {
rpc Entrance (EntranceReq) returns (EntranceReply);
// 首页弹窗
rpc Window (WindowReq) returns (WindowReply);
//
rpc Privacy(PrivacyReq) returns (PrivacyReply);
}

// 活动入口-请求
message EntranceReq {}
// 动画效果
message AnimateIcon {
// icon文件
string icon = 1;
// 动效json文件
string json = 2;
}

// 活动入口-响应
message EntranceReply {
Expand All @@ -25,8 +32,20 @@ message EntranceReply {
AnimateIcon animate_icon = 4;
}

// 首页弹窗-请求
message WindowReq {}
// 活动入口-请求
message EntranceReq {}

//
message PrivacyReply {
//
string message = 1;
}

//
message PrivacyReq {
//
string activity_uid = 1;
}

//首页弹窗-响应
message WindowReply {
Expand All @@ -39,10 +58,5 @@ message WindowReply {
string report_data = 3;
}

//动画效果
message AnimateIcon {
// icon文件
string icon = 1;
// 动效json文件
string json = 2;
}
// 首页弹窗-请求
message WindowReq {}
30 changes: 17 additions & 13 deletions bilireq/grpc/protos/bilibili/account/fission/v1/fission_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 60 additions & 19 deletions bilireq/grpc/protos/bilibili/account/fission/v1/fission_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,29 @@ else:

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class EntranceReq(google.protobuf.message.Message):
"""活动入口-请求"""
@typing_extensions.final
class AnimateIcon(google.protobuf.message.Message):
"""动画效果"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

ICON_FIELD_NUMBER: builtins.int
JSON_FIELD_NUMBER: builtins.int
icon: builtins.str
"""icon文件"""
json: builtins.str
"""动效json文件"""
def __init__(
self,
*,
icon: builtins.str = ...,
json: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["icon", b"icon", "json", b"json"]) -> None: ...

global___EntranceReq = EntranceReq
global___AnimateIcon = AnimateIcon

@typing_extensions.final
class EntranceReply(google.protobuf.message.Message):
"""活动入口-响应"""

Expand Down Expand Up @@ -56,17 +68,55 @@ class EntranceReply(google.protobuf.message.Message):

global___EntranceReply = EntranceReply

class WindowReq(google.protobuf.message.Message):
"""首页弹窗-请求"""
@typing_extensions.final
class EntranceReq(google.protobuf.message.Message):
"""活动入口-请求"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

def __init__(
self,
) -> None: ...

global___WindowReq = WindowReq
global___EntranceReq = EntranceReq

@typing_extensions.final
class PrivacyReply(google.protobuf.message.Message):
""""""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

MESSAGE_FIELD_NUMBER: builtins.int
message: builtins.str
""""""
def __init__(
self,
*,
message: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["message", b"message"]) -> None: ...

global___PrivacyReply = PrivacyReply

@typing_extensions.final
class PrivacyReq(google.protobuf.message.Message):
""""""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

ACTIVITY_UID_FIELD_NUMBER: builtins.int
activity_uid: builtins.str
""""""
def __init__(
self,
*,
activity_uid: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["activity_uid", b"activity_uid"]) -> None: ...

global___PrivacyReq = PrivacyReq

@typing_extensions.final
class WindowReply(google.protobuf.message.Message):
"""首页弹窗-响应"""

Expand Down Expand Up @@ -94,23 +144,14 @@ class WindowReply(google.protobuf.message.Message):

global___WindowReply = WindowReply

class AnimateIcon(google.protobuf.message.Message):
"""动画效果"""
@typing_extensions.final
class WindowReq(google.protobuf.message.Message):
"""首页弹窗-请求"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

ICON_FIELD_NUMBER: builtins.int
JSON_FIELD_NUMBER: builtins.int
icon: builtins.str
"""icon文件"""
json: builtins.str
"""动效json文件"""
def __init__(
self,
*,
icon: builtins.str = ...,
json: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["icon", b"icon", "json", b"json"]) -> None: ...

global___AnimateIcon = AnimateIcon
global___WindowReq = WindowReq
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def __init__(self, channel):
request_serializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.WindowReq.SerializeToString,
response_deserializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.WindowReply.FromString,
)
self.Privacy = channel.unary_unary(
'/bilibili.account.fission.v1.Fission/Privacy',
request_serializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.PrivacyReq.SerializeToString,
response_deserializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.PrivacyReply.FromString,
)


class FissionServicer(object):
Expand All @@ -45,6 +50,13 @@ def Window(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def Privacy(self, request, context):
"""
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_FissionServicer_to_server(servicer, server):
rpc_method_handlers = {
Expand All @@ -58,6 +70,11 @@ def add_FissionServicer_to_server(servicer, server):
request_deserializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.WindowReq.FromString,
response_serializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.WindowReply.SerializeToString,
),
'Privacy': grpc.unary_unary_rpc_method_handler(
servicer.Privacy,
request_deserializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.PrivacyReq.FromString,
response_serializer=bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.PrivacyReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'bilibili.account.fission.v1.Fission', rpc_method_handlers)
Expand Down Expand Up @@ -102,3 +119,20 @@ def Window(request,
bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.WindowReply.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def Privacy(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/bilibili.account.fission.v1.Fission/Privacy',
bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.PrivacyReq.SerializeToString,
bilibili_dot_account_dot_fission_dot_v1_dot_fission__pb2.PrivacyReply.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
Loading

0 comments on commit e1f23f5

Please sign in to comment.