@@ -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