diff --git a/Remote/src/main/java/com/jairrab/remote/service/RetrofitMapbox.kt b/Remote/src/main/java/com/jairrab/remote/service/RetrofitMapbox.kt index 5da95c2..f4d2fa5 100644 --- a/Remote/src/main/java/com/jairrab/remote/service/RetrofitMapbox.kt +++ b/Remote/src/main/java/com/jairrab/remote/service/RetrofitMapbox.kt @@ -5,12 +5,14 @@ import com.jairrab.remote.api.Constants.MAPBOX_API import io.reactivex.Observable import retrofit2.http.GET import retrofit2.http.Path +import retrofit2.http.Query interface RetrofitMapbox { - @GET("mapbox.places/{longitude}%2C%20{latitude}.json?access_token=$MAPBOX_API") + @GET("mapbox.places/{longitude}%2C%20{latitude}.json") fun getLocationQuery( @Path("latitude") latitude: Double, - @Path("longitude") longitude: Double + @Path("longitude") longitude: Double, + @Query("access_token") query: String = MAPBOX_API ): Observable } \ No newline at end of file diff --git a/Remote/src/main/java/com/jairrab/remote/service/RetrofitServiceFactory.kt b/Remote/src/main/java/com/jairrab/remote/service/RetrofitServiceFactory.kt index ed7a551..595af40 100644 --- a/Remote/src/main/java/com/jairrab/remote/service/RetrofitServiceFactory.kt +++ b/Remote/src/main/java/com/jairrab/remote/service/RetrofitServiceFactory.kt @@ -38,7 +38,6 @@ object RetrofitServiceFactory { val retrofit = Retrofit.Builder() .baseUrl("https://api.mapbox.com/geocoding/v5/") .client(okHttpClient) - .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addConverterFactory(GsonConverterFactory.create(gson)) .build()