mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 19:16:44 +08:00
mod: update proto
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import 'package:PiliPlus/grpc/dm/v1/dm.pb.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/community/service/dm/v1.pb.dart';
|
||||
import 'package:PiliPlus/grpc/grpc_repo.dart';
|
||||
import 'package:PiliPlus/http/api.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/grpc/grpc_repo.dart';
|
||||
import 'package:PiliPlus/http/api.dart';
|
||||
import 'package:PiliPlus/http/constants.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
@@ -49,17 +48,17 @@ class MemberHttp {
|
||||
};
|
||||
}
|
||||
|
||||
static Future<LoadingState> spaceDynamic({
|
||||
required int mid,
|
||||
required int page,
|
||||
}) async {
|
||||
dynamic result = await GrpcRepo.dynSpace(uid: mid, page: page);
|
||||
if (result['status']) {
|
||||
return LoadingState.success(result['data']);
|
||||
} else {
|
||||
return LoadingState.error(result['msg']);
|
||||
}
|
||||
}
|
||||
// static Future<LoadingState> spaceDynamic({
|
||||
// required int mid,
|
||||
// required int page,
|
||||
// }) async {
|
||||
// dynamic result = await GrpcRepo.dynSpace(uid: mid, page: page);
|
||||
// if (result['status']) {
|
||||
// return LoadingState.success(result['data']);
|
||||
// } else {
|
||||
// return LoadingState.error(result['msg']);
|
||||
// }
|
||||
// }
|
||||
|
||||
static Future<LoadingState<SpaceArticleData>> spaceArticle({
|
||||
required int mid,
|
||||
|
||||
@@ -515,7 +515,6 @@ class MsgHttp {
|
||||
static Future sendMsg({
|
||||
int? senderUid,
|
||||
int? receiverId,
|
||||
int? receiverType,
|
||||
int? msgType,
|
||||
dynamic content,
|
||||
}) async {
|
||||
@@ -525,7 +524,7 @@ class MsgHttp {
|
||||
'msg': {
|
||||
'sender_uid': senderUid,
|
||||
'receiver_id': receiverId,
|
||||
'receiver_type': receiverType ?? 1,
|
||||
'receiver_type': 1,
|
||||
'msg_type': msgType ?? 1,
|
||||
'msg_status': 0,
|
||||
'dev_id': devId,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/grpc/app/main/community/reply/v1/reply.pb.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart';
|
||||
import 'package:PiliPlus/grpc/grpc_repo.dart';
|
||||
import 'package:PiliPlus/http/api.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
@@ -123,13 +123,21 @@ class ReplyHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<MainListReply>> replyListGrpc({
|
||||
static Future<LoadingState<MainListReply>> mainList({
|
||||
int type = 1,
|
||||
required int oid,
|
||||
required CursorReq cursor,
|
||||
required Mode mode,
|
||||
required String? offset,
|
||||
required String? sessionId,
|
||||
required bool antiGoodsReply,
|
||||
}) async {
|
||||
dynamic res = await GrpcRepo.mainList(type: type, oid: oid, cursor: cursor);
|
||||
dynamic res = await GrpcRepo.mainList(
|
||||
type: type,
|
||||
oid: oid,
|
||||
mode: mode,
|
||||
offset: offset,
|
||||
sessionId: sessionId,
|
||||
);
|
||||
if (res['status']) {
|
||||
MainListReply mainListReply = res['data'];
|
||||
// keyword filter
|
||||
@@ -185,8 +193,8 @@ class ReplyHttp {
|
||||
|
||||
// ref BiliRoamingX
|
||||
static bool needRemoveGrpc(ReplyInfo reply) {
|
||||
if ((reply.content.url.isNotEmpty &&
|
||||
reply.content.url.values.any((url) {
|
||||
if ((reply.content.urls.isNotEmpty &&
|
||||
reply.content.urls.values.any((url) {
|
||||
return url.hasExtra() &&
|
||||
(url.extra.goodsCmControl == 1 ||
|
||||
url.extra.goodsItemId != 0 ||
|
||||
@@ -260,22 +268,22 @@ class ReplyHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState> replyReplyListGrpc({
|
||||
static Future<LoadingState> detailList({
|
||||
int type = 1,
|
||||
required int oid,
|
||||
required int root,
|
||||
required int rpid,
|
||||
required CursorReq cursor,
|
||||
required Mode mode,
|
||||
required String? offset,
|
||||
required bool antiGoodsReply,
|
||||
required int page,
|
||||
}) async {
|
||||
dynamic res = await GrpcRepo.detailList(
|
||||
type: type,
|
||||
oid: oid,
|
||||
root: root,
|
||||
rpid: rpid,
|
||||
cursor: cursor,
|
||||
page: page,
|
||||
mode: mode,
|
||||
offset: offset,
|
||||
);
|
||||
if (res['status']) {
|
||||
DetailListReply detailListReply = res['data'];
|
||||
@@ -296,20 +304,20 @@ class ReplyHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState> dialogListGrpc({
|
||||
static Future<LoadingState> dialogList({
|
||||
int type = 1,
|
||||
required int oid,
|
||||
required int root,
|
||||
required int rpid,
|
||||
required CursorReq cursor,
|
||||
required int dialog,
|
||||
required String? offset,
|
||||
required bool antiGoodsReply,
|
||||
}) async {
|
||||
dynamic res = await GrpcRepo.dialogList(
|
||||
type: type,
|
||||
oid: oid,
|
||||
root: root,
|
||||
rpid: rpid,
|
||||
cursor: cursor,
|
||||
dialog: dialog,
|
||||
offset: offset,
|
||||
);
|
||||
if (res['status']) {
|
||||
DialogListReply dialogListReply = res['data'];
|
||||
|
||||
@@ -2,8 +2,6 @@ import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/grpc/app/card/v1/card.pb.dart' as card;
|
||||
import 'package:PiliPlus/grpc/grpc_repo.dart';
|
||||
import 'package:PiliPlus/http/api.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
@@ -173,21 +171,21 @@ class VideoHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState> hotVideoListGrpc({required int idx}) async {
|
||||
dynamic res = await GrpcRepo.popular(idx);
|
||||
if (res['status']) {
|
||||
List<card.Card> list = <card.Card>[];
|
||||
Set<int> blackMids = GStorage.blackMids;
|
||||
for (card.Card item in res['data']) {
|
||||
if (!blackMids.contains(item.smallCoverV5.up.id.toInt())) {
|
||||
list.add(item);
|
||||
}
|
||||
}
|
||||
return LoadingState.success(list);
|
||||
} else {
|
||||
return LoadingState.error(res['msg']);
|
||||
}
|
||||
}
|
||||
// static Future<LoadingState> hotVideoListGrpc({required int idx}) async {
|
||||
// dynamic res = await GrpcRepo.popular(idx);
|
||||
// if (res['status']) {
|
||||
// List<card.Card> list = <card.Card>[];
|
||||
// Set<int> blackMids = GStorage.blackMids;
|
||||
// for (card.Card item in res['data']) {
|
||||
// if (!blackMids.contains(item.smallCoverV5.up.id.toInt())) {
|
||||
// list.add(item);
|
||||
// }
|
||||
// }
|
||||
// return LoadingState.success(list);
|
||||
// } else {
|
||||
// return LoadingState.error(res['msg']);
|
||||
// }
|
||||
// }
|
||||
|
||||
// 视频流
|
||||
static Future videoUrl({
|
||||
|
||||
Reference in New Issue
Block a user