getBotsWithHttpInfo method

Future<Response> getBotsWithHttpInfo({
  1. int? page,
  2. int? perPage,
  3. bool? includeDeleted,
  4. bool? onlyOrphaned,
})

Get bots

Get a page of a list of bots. ##### Permissions Must have read_bots permission for bots you are managing, and read_others_bots permission for bots others are managing. Minimum server version: 5.10

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • int perPage: The number of users per page. There is a maximum limit of 200 users per page.

  • bool includeDeleted: If deleted bots should be returned.

  • bool onlyOrphaned: When true, only orphaned bots will be returned. A bot is consitered orphaned if it's owner has been deactivated.

Implementation

Future<Response> getBotsWithHttpInfo({
  int? page,
  int? perPage,
  bool? includeDeleted,
  bool? onlyOrphaned,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/bots';

  // 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 (includeDeleted != null) {
    queryParams.addAll(_queryParams('', 'include_deleted', includeDeleted));
  }
  if (onlyOrphaned != null) {
    queryParams.addAll(_queryParams('', 'only_orphaned', onlyOrphaned));
  }

  const contentTypes = <String>[];

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