Files
bilibili-API-collect/grpc_api/bilibili/broadcast/v1/room.proto
T

79 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

2021-07-06 21:28:36 +08:00
syntax = "proto3";
package bilibili.broadcast.v1;
import "bilibili/rpc/status.proto";
import "google/protobuf/any.proto";
//
service BroadcastRoom {
//
rpc Enter(stream RoomReq) returns (stream RoomResp);
}
//
2022-01-31 00:33:38 +08:00
message RoomErrorEvent {
2021-07-06 21:28:36 +08:00
//
2022-01-31 00:33:38 +08:00
bilibili.rpc.Status status = 1;
}
//
message RoomJoinEvent {
}
//
message RoomLeaveEvent {
2021-07-06 21:28:36 +08:00
}
//
message RoomMessageEvent {
//
string target_path = 1;
//
google.protobuf.Any body = 2;
}
//
2022-01-31 00:33:38 +08:00
message RoomOnlineEvent {
2021-07-06 21:28:36 +08:00
//
2022-01-31 00:33:38 +08:00
int32 online = 1;
//
int32 all_online = 2;
2021-07-06 21:28:36 +08:00
}
//
message RoomReq {
// {type}://{room_id}
string id = 1;
oneof event {
//
RoomJoinEvent join = 2;
//
RoomLeaveEvent leave = 3;
//
RoomOnlineEvent online = 4;
//
RoomMessageEvent msg = 5;
}
}
//
message RoomResp {
// {type}://{room_id}
string id = 1;
oneof event {
//
RoomJoinEvent join = 2;
//
RoomLeaveEvent leave = 3;
//
RoomOnlineEvent online = 4;
//
RoomMessageEvent msg = 5;
//
RoomErrorEvent err = 6;
}
}