mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-19 03:18:24 +00:00
internal refactoring : use an apiPath builder
This commit is contained in:
parent
852fab0407
commit
59748a2481
3 changed files with 155 additions and 48 deletions
|
@ -104,13 +104,13 @@ class ApiCall {
|
|||
* Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the
|
||||
* API call. At the end, the given parser will be used to convert the response to a more useful result object.
|
||||
*
|
||||
* @param apiPath on which we will make the HTTP request
|
||||
* @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder}
|
||||
* @param parser used to parse the response
|
||||
* @return the result of the call, as formatted by the parser
|
||||
* @throws RundeckApiException in case of error when calling the API
|
||||
* @throws RundeckApiLoginException if the login fails
|
||||
*/
|
||||
public <T> T get(String apiPath, NodeParser<T> parser) throws RundeckApiException, RundeckApiLoginException {
|
||||
public <T> T get(ApiPathBuilder apiPath, NodeParser<T> parser) throws RundeckApiException, RundeckApiLoginException {
|
||||
String apiUrl = client.getUrl() + RundeckClient.API_ENDPOINT + apiPath;
|
||||
|
||||
HttpClient httpClient = instantiateHttpClient();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue