mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: set top dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -764,4 +764,6 @@ class Api {
|
||||
static const String pgcTimeline = '/pgc/web/timeline';
|
||||
|
||||
static const String searchTrending = '/x/v2/search/trending/ranking';
|
||||
|
||||
static const String setTopDyn = '/x/dynamic/feed/space/set_top';
|
||||
}
|
||||
|
||||
@@ -118,4 +118,23 @@ class DynamicsHttp {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static Future setTop({
|
||||
required dynamic dynamicId,
|
||||
}) async {
|
||||
var res = await Request().post(
|
||||
Api.setTopDyn,
|
||||
queryParameters: {
|
||||
'csrf': await Request.getCsrf(),
|
||||
},
|
||||
data: {
|
||||
'dyn_str': dynamicId,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {'status': true};
|
||||
} else {
|
||||
return {'status': false, 'msg': res.data['message']};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user