getMarketplacePluginsWithHttpInfo method

Future<Response> getMarketplacePluginsWithHttpInfo({
  1. int? page,
  2. int? perPage,
  3. String? filter,
  4. String? serverVersion,
  5. bool? localOnly,
})

Gets all the marketplace plugins

Gets all plugins from the marketplace server, merging data from locally installed plugins as well as prepackaged plugins shipped with the server. ##### Permissions Must have manage_system permission. Minimum server version: 5.16

Note: This method returns the HTTP Response.

Parameters:

  • int page: Page number to be fetched. (not yet implemented)

  • int perPage: Number of item per page. (not yet implemented)

  • String filter: Set to filter plugins by ID, name, or description.

  • String serverVersion: Set to filter minimum plugin server version. (not yet implemented)

  • bool localOnly: Set true to only retrieve local plugins.

Implementation

Future<Response> getMarketplacePluginsWithHttpInfo({
  int? page,
  int? perPage,
  String? filter,
  String? serverVersion,
  bool? localOnly,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/plugins/marketplace';

  // 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 (filter != null) {
    queryParams.addAll(_queryParams('', 'filter', filter));
  }
  if (serverVersion != null) {
    queryParams.addAll(_queryParams('', 'server_version', serverVersion));
  }
  if (localOnly != null) {
    queryParams.addAll(_queryParams('', 'local_only', localOnly));
  }

  const contentTypes = <String>[];

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