mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 08:36:17 +08:00
opt msg unread
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -475,11 +475,11 @@ class Api {
|
||||
|
||||
// 获取未读私信数
|
||||
// https://api.vc.bilibili.com/session_svr/v1/session_svr/single_unread
|
||||
// static const String msgUnread =
|
||||
// '${HttpString.tUrl}/session_svr/v1/session_svr/single_unread';
|
||||
static const String msgUnread =
|
||||
'${HttpString.tUrl}/session_svr/v1/session_svr/single_unread';
|
||||
|
||||
// 获取消息中心未读信息
|
||||
// static const String msgFeedUnread = '/x/msgfeed/unread';
|
||||
static const String msgFeedUnread = '/x/msgfeed/unread';
|
||||
//https://api.bilibili.com/x/msgfeed/reply?platform=web&build=0&mobi_app=web
|
||||
static const String msgFeedReply = '/x/msgfeed/reply';
|
||||
//https://api.bilibili.com/x/msgfeed/at?platform=web&build=0&mobi_app=web
|
||||
|
||||
@@ -9,6 +9,8 @@ import 'package:PiliPlus/models_new/msg/msg_like/data.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/data.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_sys/data.dart';
|
||||
import 'package:PiliPlus/models_new/msg/session_ss/data.dart';
|
||||
import 'package:PiliPlus/models_new/msgfeed_unread/data.dart';
|
||||
import 'package:PiliPlus/models_new/single_unread/data.dart';
|
||||
import 'package:PiliPlus/models_new/upload_bfs/data.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/wbi_sign.dart';
|
||||
@@ -556,4 +558,43 @@ class MsgHttp {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
static Future msgUnread() async {
|
||||
var res = await Request().get(
|
||||
Api.msgUnread,
|
||||
queryParameters: {
|
||||
'build': 0,
|
||||
'mobi_app': 'web',
|
||||
'unread_type': 0,
|
||||
'web_location': 333.1365,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {
|
||||
'status': true,
|
||||
'data': SingleUnreadData.fromJson(res.data['data'])
|
||||
};
|
||||
} else {
|
||||
return {'status': false, 'data': res.data['message']};
|
||||
}
|
||||
}
|
||||
|
||||
static Future msgFeedUnread() async {
|
||||
var res = await Request().get(
|
||||
Api.msgFeedUnread,
|
||||
queryParameters: {
|
||||
'build': 0,
|
||||
'mobi_app': 'web',
|
||||
'web_location': 333.1365,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {
|
||||
'status': true,
|
||||
'data': MsgFeedUnreadData.fromJson(res.data['data'])
|
||||
};
|
||||
} else {
|
||||
return {'status': false, 'data': res.data['message']};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user