diff --git a/src/source_package_publishing_history.cpp b/src/source_package_publishing_history.cpp index 6b4ae3c..3171e2a 100644 --- a/src/source_package_publishing_history.cpp +++ b/src/source_package_publishing_history.cpp @@ -114,3 +114,11 @@ std::generator source_package_publishing_hist data=nlohmann::json::parse(response.value()); } } + +bool source_package_publishing_history::requestDeletion(const std::string& removal_comment) { + std::map params; + params["ws.op"] = "requestDeletion"; + params["removal_comment"] = removal_comment; + auto resp = lp->api_post(self_link, params); + return resp.has_value(); +} diff --git a/src/source_package_publishing_history.h b/src/source_package_publishing_history.h index 8bc4387..cf3c418 100644 --- a/src/source_package_publishing_history.h +++ b/src/source_package_publishing_history.h @@ -45,6 +45,8 @@ public: std::optional distro_series = getDistroSeries(); std::generator getPublishedBinaries(bool active_binaries_only = false) const; + bool requestDeletion(const std::string& removal_comment = ""); + std::string distro_series_link; std::string self_link; std::string source_package_name;