Files
nym/nym-node-status-api/nym-node-status-client/src/api.rs
T
dynco-nym e7f806219c Move NS client to separate package under NS API (#5171)
* Move client code to NS API

* Move client to separate package

* Move things around

* Adjust run scripts

* rustfmt

* Add client to workspace
2024-11-26 15:59:42 +01:00

19 lines
477 B
Rust

use std::fmt::Display;
pub(super) struct ApiPaths {
server_address: String,
}
impl ApiPaths {
pub(super) fn new(server_address: String) -> Self {
Self { server_address }
}
pub(super) fn request_testrun(&self) -> String {
format!("{}/internal/testruns", self.server_address)
}
pub(super) fn submit_results(&self, testrun_id: impl Display) -> String {
format!("{}/internal/testruns/{}", self.server_address, testrun_id)
}
}