getTopReactionsForTeamWithHttpInfo method
Get a list of the top reactions for a team.
Get a list of the top reactions across all public and private channels (the user is a member of) for a given team. ##### Permissions Must have view_team
permission for the team.
Note: This method returns the HTTP Response
.
Parameters:
-
String teamId (required): Team GUID
-
String timeRange (required): Time range can be "today", "7_day", or "28_day". -
today
: reactions posted on the current day. -7_day
: reactions posted in the last 7 days. -28_day
: reactions posted in the last 28 days. -
int page: The page to select.
-
int perPage: The number of items per page, up to a maximum of 200.
Implementation
Future<Response> getTopReactionsForTeamWithHttpInfo(
String teamId,
String timeRange, {
int? page,
int? perPage,
}) async {
// ignore: prefer_const_declarations
final path = r'/teams/{team_id}/top/reactions'.replaceAll('{team_id}', teamId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'time_range', timeRange));
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,
);
}