getOAuthAppsWithHttpInfo method

Future<Response> getOAuthAppsWithHttpInfo({
  1. int? page,
  2. int? perPage,
})

Get OAuth apps

Get a page of OAuth 2.0 client applications registered with Mattermost. ##### Permissions With manage_oauth permission, the apps registered by the logged in user are returned. With manage_system_wide_oauth permission, all apps regardless of creator are returned.

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • int perPage: The number of apps per page.

Implementation

Future<Response> getOAuthAppsWithHttpInfo({
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/oauth/apps';

  // 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));
  }

  const contentTypes = <String>[];

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