feat: set top dyn

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-16 08:01:21 +08:00
parent 2cc9324f08
commit 3638d65008
8 changed files with 75 additions and 1 deletions

View File

@@ -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';
}

View File

@@ -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']};
}
}
}