Skip to content

Commit e41441b

Browse files
authored
Merge pull request #3 from nicholasM95/develop
Develop
2 parents fc5390f + c60a6d3 commit e41441b

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add the Maven Dependency to your `pom.xml`
1616
<dependency>
1717
<groupId>be.nicholasmeyers</groupId>
1818
<artifactId>skoda-api-client</artifactId>
19-
<version>1.0.0</version>
19+
<version>1.1.0</version>
2020
</dependency>
2121
```
2222

@@ -47,7 +47,7 @@ Make sure to replace `YOUR_CARS_VIN`, `YOUR_EMAIL`, and `YOUR_PASSWORD` with you
4747
```
4848
String vin = "YOUR_CARS_VIN";
4949
CarService carService = new CarService("YOUR_EMAIL", "YOUR_PASSWORD");
50-
carService.flash(vin, 30);
50+
String status = carService.flash(vin, 30);
5151
```
5252

5353
## Honk Car Horn
@@ -57,7 +57,7 @@ Make sure to replace `YOUR_CARS_VIN`, `YOUR_EMAIL`, and `YOUR_PASSWORD` with you
5757
```
5858
String vin = "YOUR_CARS_VIN";
5959
CarService carService = new CarService("YOUR_EMAIL", "YOUR_PASSWORD");
60-
carService.honk(vin, 30);
60+
String status = carService.honk(vin, 30);
6161
```
6262

6363
## Start Car Ventilator

pom.xml

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

77
<groupId>be.nicholasmeyers</groupId>
88
<artifactId>skoda-api-client</artifactId>
9-
<version>1.0.1</version>
9+
<version>1.1.0-SNAPSHOT</version>
1010

1111
<name>skoda-api-client</name>
1212
<description>skoda-api-client</description>

src/main/java/be/nicholasmeyers/skoda/api/client/CarService.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ public CarCoolingInfo getCooling(String vin) {
8080
*
8181
* @param vin The VIN of the car.
8282
* @param duration The duration to flash the lights (in seconds).
83+
* @return The status of the request.
8384
* @throws RuntimeException If the duration exceeds the maximum allowed or if an error occurs.
8485
*/
85-
public void flash(String vin, Integer duration) {
86+
public String flash(String vin, Integer duration) {
8687
if (duration > 30) {
8788
throw new RuntimeException("maximum duration is 30");
8889
}
@@ -93,7 +94,7 @@ public void flash(String vin, Integer duration) {
9394
flashWebRequestResource.setLongitude(location.getLongitude());
9495

9596
try {
96-
flashApi.flash(vin, flashWebRequestResource);
97+
return flashApi.flash(vin, flashWebRequestResource).getStatus();
9798
} catch (ApiException e) {
9899
throw new RuntimeException(e);
99100
}
@@ -104,9 +105,10 @@ public void flash(String vin, Integer duration) {
104105
*
105106
* @param vin The VIN of the car.
106107
* @param duration The duration to honk the horn (in seconds).
108+
* @return The status of the request.
107109
* @throws RuntimeException If the duration exceeds the maximum allowed or if an error occurs.
108110
*/
109-
public void honk(String vin, Integer duration) {
111+
public String honk(String vin, Integer duration) {
110112
if (duration > 30) {
111113
throw new RuntimeException("maximum duration is 30");
112114
}
@@ -117,7 +119,7 @@ public void honk(String vin, Integer duration) {
117119
honkWebRequestResource.setLongitude(location.getLongitude());
118120

119121
try {
120-
honkApi.honk(vin, honkWebRequestResource);
122+
return honkApi.honk(vin, honkWebRequestResource).getStatus();
121123
} catch (ApiException e) {
122124
throw new RuntimeException(e);
123125
}

0 commit comments

Comments
 (0)