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