From 5b8213b7d3b3027d3b4bb0b3e282281dcdf7ec29 Mon Sep 17 00:00:00 2001 From: ashir7171 Date: Sat, 25 May 2024 23:02:02 +0100 Subject: [PATCH 1/3] coil starter branch --- .../marsphotos/data/MarsPhtotsRepository.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt diff --git a/app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt b/app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt new file mode 100644 index 0000000..8eb91bb --- /dev/null +++ b/app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt @@ -0,0 +1,16 @@ +package com.example.marsphotos.data + +import com.example.marsphotos.model.MarsPhoto + +interface MarsPhotosRepository { + + suspend fun getMarsPhotos(): List + + +} + +class NetworkMarsPhotosRepository():MarsPhotosRepository{ + override suspend fun getMarsPhotos(): List { + TODO("Not yet implemented") + } +} \ No newline at end of file From 3c01bca041530493f54ba002c02f6330402ebc1f Mon Sep 17 00:00:00 2001 From: ashir7171 Date: Sat, 25 May 2024 23:04:22 +0100 Subject: [PATCH 2/3] coil starter branch --- app/build.gradle.kts | 1 + .../java/com/example/marsphotos/data/MarsPhotosRepository.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0f0167e..3d536be 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -86,6 +86,7 @@ dependencies { testImplementation("junit:junit:4.13.2") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") + testImplementation("junit:junit:4.12") androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00")) androidTestImplementation("androidx.compose.ui:ui-test-junit4") diff --git a/app/src/main/java/com/example/marsphotos/data/MarsPhotosRepository.kt b/app/src/main/java/com/example/marsphotos/data/MarsPhotosRepository.kt index 7142d96..2b37106 100644 --- a/app/src/main/java/com/example/marsphotos/data/MarsPhotosRepository.kt +++ b/app/src/main/java/com/example/marsphotos/data/MarsPhotosRepository.kt @@ -30,6 +30,7 @@ interface MarsPhotosRepository { * Network Implementation of Repository that fetch mars photos list from marsApi. */ class NetworkMarsPhotosRepository( + private val marsApiService: MarsApiService ) : MarsPhotosRepository { /** Fetches list of MarsPhoto from marsApi*/ From 206dcebc266dec820a345879876446f2ee23a665 Mon Sep 17 00:00:00 2001 From: ashir7171 Date: Sat, 25 May 2024 23:10:09 +0100 Subject: [PATCH 3/3] coil starter branch --- .../marsphotos/data/MarsPhtotsRepository.kt | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt diff --git a/app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt b/app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt deleted file mode 100644 index 8eb91bb..0000000 --- a/app/src/main/java/com/example/marsphotos/data/MarsPhtotsRepository.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.marsphotos.data - -import com.example.marsphotos.model.MarsPhoto - -interface MarsPhotosRepository { - - suspend fun getMarsPhotos(): List - - -} - -class NetworkMarsPhotosRepository():MarsPhotosRepository{ - override suspend fun getMarsPhotos(): List { - TODO("Not yet implemented") - } -} \ No newline at end of file