Skip to content

Commit

Permalink
Update TripPlanningService
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Sep 18, 2024
1 parent af73306 commit 8c42fd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/xyz/ksharma/krail/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import timber.log.Timber
import xyz.ksharma.krail.design.system.theme.StartTheme
import xyz.ksharma.krail.trip_planner.network.api.model.StopType
import xyz.ksharma.krail.trip_planner.network.api.repository.TripPlanningRepository
import xyz.ksharma.krail.trip_planner.network.api.service.TripPlanningService
import javax.inject.Inject

@AndroidEntryPoint
Expand All @@ -19,12 +20,14 @@ class MainActivity : ComponentActivity() {
@Inject
lateinit var tripPlanningRepo: TripPlanningRepository


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

// Configures the system bars with a transparent background.
enableEdgeToEdge()


lifecycleScope.launch {
var x =
tripPlanningRepo.stopFinder(stopType = StopType.STOP, stopSearchQuery = "Central")
Expand All @@ -38,6 +41,7 @@ class MainActivity : ComponentActivity() {
Timber.d("ANY: ${x.getOrNull()?.locations?.map { it.productClasses.contains(1) }}")
}


setContent {
StartTheme {
KrailApp()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ interface TripPlanningService {
*
* Available values : EPSG:4326
*/
@Query("coordOutputFormat") coordOutputFormat: String= "EPSG:4326",
@Query("coordOutputFormat") coordOutputFormat: String = "EPSG:4326",

/**
* Including this parameter enables a number of options that result in the stop finder
Expand All @@ -66,7 +66,7 @@ interface TripPlanningService {
*
* Default value : true
*/
@Query("TfNSWSF") tfNSWSF:String = "true",
@Query("TfNSWSF") tfNSWSF: String = "true",

/**
* Indicates which version of the API the caller is expecting for both request and response
Expand All @@ -75,7 +75,7 @@ interface TripPlanningService {
*
* Default value : 10.2.1.42
*/
@Query("version") version: String = "10.2.1.42",
@Query("version") version: String? = null,
): Response<StopFinderResponse>

/**
Expand Down

0 comments on commit 8c42fd2

Please sign in to comment.