getIncomingWebhooksWithHttpInfo method

Future<Response> getIncomingWebhooksWithHttpInfo({
  1. int? page,
  2. int? perPage,
  3. String? teamId,
})

List incoming webhooks

Get a page of a list of incoming webhooks. Optionally filter for a specific team using query parameters. ##### Permissions manage_webhooks for the system or manage_webhooks for the specific team.

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • int perPage: The number of hooks per page.

  • String teamId: The ID of the team to get hooks for.

Implementation

Future<Response> getIncomingWebhooksWithHttpInfo({
  int? page,
  int? perPage,
  String? teamId,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/hooks/incoming';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (perPage != null) {
    queryParams.addAll(_queryParams('', 'per_page', perPage));
  }
  if (teamId != null) {
    queryParams.addAll(_queryParams('', 'team_id', teamId));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}