listGroupsWithHttpInfo method

Future<Response> listGroupsWithHttpInfo(
  1. String account, {
  2. Object? page,
  3. int? limit,
})

List all groups

Returns a list of groups. This will include all groups associated with the authenticated bearer, including groups they are an owner of, as well as groups they are a member of. The groups are returned sorted by creation date, with the most recent groups appearing first.

Note: This method returns the HTTP Response.

Parameters:

  • String account (required): The identifier (UUID) or slug of your Keygen account.

  • Object page: Object containing page size and page number.

  • int limit:

Implementation

Future<Response> listGroupsWithHttpInfo(String account, { Object? page, int? limit, }) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/groups'
    .replaceAll('{account}', account);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }

  const contentTypes = <String>[];


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