Skip to content

Commit a9eb625

Browse files
committed
Update version to 0.1.1 and add method to retrieve routes with body and parameters
1 parent 1578a8a commit a9eb625

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group = "fr.sandro642.github"
9-
version = "0.1.0"
9+
version = "0.1.1"
1010

1111
// Ajoutez cette tâche à votre build.gradle.kts
1212
tasks.register("printVersion") {

src/main/java/fr/sandro642/github/jobs/JobGetInfos.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ public JobGetInfos getRoutesWithParams(MethodType methodType, String routeName,
6969
return getRoutes(null, methodType, routeName, null, params);
7070
}
7171

72+
/**
73+
* Récupère les routes depuis le fichier YAML et construit l'URL complète avec un corps de requête et des paramètres
74+
* @param methodType Type de méthode HTTP (GET, POST)
75+
* @param routeName Nom de la route dans le fichier YAML
76+
* @param body Corps de la requête pour POST (peut être null pour GET)
77+
* @param params Paramètres supplémentaires pour la requête
78+
* @return JobGetInfos pour chaînage
79+
*/
80+
public JobGetInfos getRoutesBoth(MethodType methodType, String routeName, Map<String, Object> body, Map<String, Object> params) {
81+
return getRoutes(null, methodType, routeName, body, params);
82+
}
83+
7284
/**
7385
* Récupère les routes depuis le fichier YAML et construit l'URL complète
7486
* @param versionType Version de l'API (V1_BRANCH, V2_BRANCH)

src/main/java/fr/sandro642/github/utils/YamlUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public String getURL() {
4444
*/
4545
public String getRoute(String routeName) {
4646
String yamlFilePath = ConnectorAPI.StoreAndRetrieve().store.get(ConnectorAPI.StoreAndRetrieve().FILE_LOCATION_KEY) + "/infos.yml";
47-
System.out.println("Test dans getRoutes : " + ConnectorAPI.StoreAndRetrieve().store.get(ConnectorAPI.StoreAndRetrieve().FILE_LOCATION_KEY) + " YamlPath : " + yamlFilePath);
4847

4948
try (InputStream inputStream = Files.newInputStream(Paths.get(yamlFilePath))) {
5049
Yaml yaml = new Yaml();

0 commit comments

Comments
 (0)