diff --git a/src/build.cpp b/src/build.cpp index 035c3ac..e1c7f6e 100644 --- a/src/build.cpp +++ b/src/build.cpp @@ -94,6 +94,15 @@ bool build::retry() { return response.has_value(); } +bool build::rescore(int score) { + if (self_link.empty()) return false; + std::map params; + params["ws.op"] = "rescore"; + params["score"] = score; + auto response = lp->api_post(self_link, params); + return response.has_value(); +} + void build::set_lp(launchpad* lp_ptr) { lp = lp_ptr; } diff --git a/src/build.h b/src/build.h index 9152f8f..4e0c9ee 100644 --- a/src/build.h +++ b/src/build.h @@ -59,6 +59,7 @@ public: // Methods bool cancel(); bool retry(); + bool rescore(int score); void set_lp(launchpad* lp_ptr); // Read-only fields