listComment<T extends APIModel> method
Future<ListModelResponse<Comment> >
listComment<T extends APIModel>({
- required CommentType type,
- required T parent,
- Comment? replyComment,
- int limit = 50,
- dynamic skip = 0,
List all comment Parameters
type
Comment typeparent
The parent of comment (if type is translate parent is Translation, if type is minecraft wiki parent is MinecraftMod)replyComment
The comment to reply to (optional)limit
limit the number of results. (max 50)skip
skip the first n results.
Implementation
Future<ListModelResponse<Comment>> listComment<T extends APIModel>(
{required CommentType type,
required T parent,
Comment? replyComment,
int limit = 50,
skip = 0}) async {
if (parent is Translation || parent is MinecraftMod) {
return await listCommentInternal(
type: type,
parentUUID: parent.uuid,
replyComment: replyComment,
limit: limit,
skip: skip);
} else {
throw Exception('parent must be a Translation or a MinecraftMod');
}
}