addBookmark method
收藏作品
id
- 作品ID
tags
- 标签(自己添加的)
isNovel
- 小说
Implementation
Future<void> addBookmark(int id, {List<String> tags = const [], Restrict restrict = Restrict.public, bool isNovel = false}) async {
await _httpClient.post<String>(
'/v2/${isNovel ? 'novel' : 'illust'}/bookmark/add',
data: FormData.fromMap(
{
'${isNovel ? 'novel' : 'illust'}_id': id,
'restrict': restrict.toPixivStringParameter(),
'tags': tags,
},
),
);
}