getFlaggedPostsForUserWithHttpInfo method
Get a list of flagged posts
Get a page of flagged posts of a user provided user id string. Selects from a channel, team, or all flagged posts by a user. Will only return posts from channels in which the user is member. ##### Permissions Must be user or have manage_system
permission.
Note: This method returns the HTTP Response
.
Parameters:
Implementation
Future<Response> getFlaggedPostsForUserWithHttpInfo(
String userId, {
String? teamId,
String? channelId,
int? page,
int? perPage,
}) async {
// ignore: prefer_const_declarations
final path = r'/users/{user_id}/posts/flagged'.replaceAll('{user_id}', userId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (teamId != null) {
queryParams.addAll(_queryParams('', 'team_id', teamId));
}
if (channelId != null) {
queryParams.addAll(_queryParams('', 'channel_id', channelId));
}
if (page != null) {
queryParams.addAll(_queryParams('', 'page', page));
}
if (perPage != null) {
queryParams.addAll(_queryParams('', 'per_page', perPage));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}