|
|
|
@ -153,10 +153,38 @@ std::generator<archive_permission> archive::getAllPermissions() const {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::generator<source_package_publishing_history> archive::getPublishedSources(const std::string& status) const {
|
|
|
|
|
std::map<std::string, std::string> params;
|
|
|
|
|
params["ws.op"] = "getPublishedSources";
|
|
|
|
|
params["status"] = status;
|
|
|
|
|
std::generator<source_package_publishing_history> archive::getPublishedSources(
|
|
|
|
|
const std::string& component_name,
|
|
|
|
|
const std::string& created_since_date,
|
|
|
|
|
std::optional<distro_series> ds,
|
|
|
|
|
const bool exact_match,
|
|
|
|
|
const bool order_by_date,
|
|
|
|
|
const std::string& pocket,
|
|
|
|
|
const std::string& source_name,
|
|
|
|
|
const std::string& status,
|
|
|
|
|
const std::string& version
|
|
|
|
|
) const {
|
|
|
|
|
std::map<std::string, std::string> params = {
|
|
|
|
|
{"exact_match", exact_match ? "true" : ""},
|
|
|
|
|
{"order_by_date", order_by_date ? "true" : ""},
|
|
|
|
|
{"distro_series", ds ? ds.value().self_link : ""},
|
|
|
|
|
{"component_name", !component_name.empty() ? component_name : ""},
|
|
|
|
|
{"created_since_date", !created_since_date.empty() ? created_since_date : ""},
|
|
|
|
|
{"pocket", !pocket.empty() ? pocket : ""},
|
|
|
|
|
{"source_name", !source_name.empty() ? source_name : ""},
|
|
|
|
|
{"status", !status.empty() ? status : ""},
|
|
|
|
|
{"version", !version.empty() ? version : ""}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Remove empty entries
|
|
|
|
|
for (auto it = params.begin(); it != params.end(); ) {
|
|
|
|
|
if (it->second.empty()) {
|
|
|
|
|
it = params.erase(it);
|
|
|
|
|
} else {
|
|
|
|
|
++it;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto response = lp->api_get(self_link, params);
|
|
|
|
|
if(!response) co_return;
|
|
|
|
|
auto data = nlohmann::json::parse(response.value());
|
|
|
|
|