installPluginFromUrlWithHttpInfo method

Future<Response> installPluginFromUrlWithHttpInfo(
  1. String pluginDownloadUrl, {
  2. String? force,
})

Install plugin from url

Supply a URL to a plugin compressed in a .tar.gz file. Plugins must be enabled in the server's config settings. ##### Permissions Must have manage_system permission. Minimum server version: 5.14

Note: This method returns the HTTP Response.

Parameters:

  • String pluginDownloadUrl (required): URL used to download the plugin

  • String force: Set to 'true' to overwrite a previously installed plugin with the same ID, if any

Implementation

Future<Response> installPluginFromUrlWithHttpInfo(
  String pluginDownloadUrl, {
  String? force,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/plugins/install_from_url';

  // ignore: prefer_final_locals
  Object? postBody;

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

  queryParams.addAll(_queryParams('', 'plugin_download_url', pluginDownloadUrl));
  if (force != null) {
    queryParams.addAll(_queryParams('', 'force', force));
  }

  const contentTypes = <String>[];

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