getPostsThreadedPagedFromChild static method
Future<PostSearchResponseResponse>
getPostsThreadedPagedFromChild(
- HttpClient client,
- String childPostId,
- int page,
- int pageSize,
- int replySize,
- bool rootThreadMode,
- String showbanned,
- ForumPostSortEnum sortMode,
Returns a thread of posts starting at the topicId of the input childPostId, optionally returning replies to those posts as well as the original parent.
Implementation
static Future<PostSearchResponseResponse> getPostsThreadedPagedFromChild (
HttpClient client,
String childPostId,
int page,
int pageSize,
int replySize,
bool rootThreadMode,
String showbanned,
ForumPostSortEnum sortMode,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _childPostId = '$childPostId';
final String _page = '$page';
final String _pageSize = '$pageSize';
final String _replySize = '$replySize';
final String _rootThreadMode = '$rootThreadMode';
final String _sortMode = '${sortMode.value}';
params['showbanned'] = showbanned;
final HttpClientConfig config = HttpClientConfig('GET', '/Forum/GetPostsThreadedPagedFromChild/$_childPostId/$_page/$_pageSize/$_replySize/$_rootThreadMode/$_sortMode/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return PostSearchResponseResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}