getSchemesWithHttpInfo method

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

Get the schemes.

Get a page of schemes. Use the query parameters to modify the behaviour of this endpoint. ##### Permissions Must have manage_system permission. Minimum server version: 5.0

Note: This method returns the HTTP Response.

Parameters:

  • String scope: Limit the results returned to the provided scope, either team or channel.

  • int page: The page to select.

  • int perPage: The number of schemes per page.

Implementation

Future<Response> getSchemesWithHttpInfo({
  String? scope,
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/schemes';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (scope != null) {
    queryParams.addAll(_queryParams('', 'scope', scope));
  }
  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,
  );
}