mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 04:57:23 +00:00
View a user's public bookmarks
This commit is contained in:
@@ -233,6 +233,18 @@ class Network {
|
||||
}
|
||||
}
|
||||
|
||||
Future<Res<List<Illust>>> getUserBookmarks(String uid, [String? nextUrl]) async {
|
||||
var res = await apiGet(nextUrl ??
|
||||
"/v1/user/bookmarks/illust?user_id=$uid&restrict=public");
|
||||
if (res.success) {
|
||||
return Res(
|
||||
(res.data["illusts"] as List).map((e) => Illust.fromJson(e)).toList(),
|
||||
subData: res.data["next_url"]);
|
||||
} else {
|
||||
return Res.error(res.errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
Future<Res<bool>> addBookmark(String id, String method,
|
||||
[String type = "public"]) async {
|
||||
var res = method == "add"
|
||||
|
Reference in New Issue
Block a user