|
7 | 7 |
|
8 | 8 | import com.baato.baatolibrary.application.BaatoLib; |
9 | 9 | import com.baato.baatolibrary.models.DirectionsAPIResponse; |
10 | | - |
11 | 10 | import com.baato.baatolibrary.models.ErrorResponse; |
| 11 | +import com.baato.baatolibrary.models.NavResponse; |
12 | 12 | import com.baato.baatolibrary.navigation.NavigateResponseConverter; |
13 | 13 | import com.baato.baatolibrary.requests.BaatoAPI; |
14 | 14 | import com.baato.baatolibrary.utilities.BaatoUtil; |
15 | 15 | import com.baato.baatolibrary.utilities.ErrorUtils; |
16 | 16 |
|
17 | | -import java.io.IOException; |
18 | 17 | import java.util.HashMap; |
19 | 18 | import java.util.Locale; |
20 | 19 | import java.util.Map; |
21 | 20 |
|
22 | 21 | import retrofit2.Call; |
23 | 22 | import retrofit2.Callback; |
24 | 23 | import retrofit2.Response; |
25 | | -import retrofit2.http.GET; |
26 | | -import retrofit2.http.Query; |
27 | 24 |
|
28 | 25 | @Keep |
29 | 26 | public class BaatoRouting { |
@@ -171,10 +168,18 @@ public static String getParsedNavResponse(DirectionsAPIResponse response, String |
171 | 168 | return NavigateResponseConverter.convertFromGHResponse(response.getData().get(0), mode, locale, context).toString(); |
172 | 169 | } |
173 | 170 |
|
| 171 | + public static String getParsedNavResponse(NavResponse response, String mode, Locale locale, Context context) { |
| 172 | + return NavigateResponseConverter.convertFromGHResponse(response, mode, locale, context).toString(); |
| 173 | + } |
| 174 | + |
174 | 175 | public static String getParsedNavResponse(DirectionsAPIResponse response, String mode, Context context) { |
175 | 176 | return NavigateResponseConverter.convertFromGHResponse(response.getData().get(0), mode, context).toString(); |
176 | 177 | } |
177 | 178 |
|
| 179 | + public static String getParsedNavResponse(NavResponse response, String mode, Context context) { |
| 180 | + return NavigateResponseConverter.convertFromGHResponse(response, mode, context).toString(); |
| 181 | + } |
| 182 | + |
178 | 183 | private Map<String, Object> giveMeQueryFilter(Context context) { |
179 | 184 | Map<String, Object> queryMap = new HashMap<>(); |
180 | 185 | //compulsory ones |
|
0 commit comments