Skip to content

Commit 4e80f05

Browse files
Issue 1 - initial structure
1 parent 9c4eeb1 commit 4e80f05

File tree

11 files changed

+103
-17
lines changed

11 files changed

+103
-17
lines changed

.idea/deploymentTargetDropDown.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.codandotv.streamplayerapp.data
2+
3+
import com.codandotv.streamplayerapp.domain.model.ListMovie
4+
import com.codandotv.streamplayerapp.domain.toListMovie
5+
6+
interface ListMovieRepository {
7+
fun getMovies() : ListMovie
8+
}
9+
10+
class ListMovieRepositoryImpl(
11+
private val service : ListMovieService
12+
) : ListMovieRepository {
13+
14+
override fun getMovies(): ListMovie =
15+
service.getMovies()
16+
.toListMovie()
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.codandotv.streamplayerapp.data
2+
3+
import com.codandotv.streamplayerapp.data.model.ListMovieResponse
4+
5+
interface ListMovieService {
6+
fun getMovies() : ListMovieResponse
7+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.codandotv.streamplayerapp.data.model
2+
3+
data class ListMovieResponse(
4+
val name : String
5+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.codandotv.streamplayerapp.domain
2+
3+
interface ListMovieAnalytics{}
4+
5+
class ListMovieAnalyticsImpl : ListMovieAnalytics {
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.codandotv.streamplayerapp.domain
2+
3+
import com.codandotv.streamplayerapp.data.model.ListMovieResponse
4+
import com.codandotv.streamplayerapp.domain.model.ListMovie
5+
6+
fun ListMovieResponse.toListMovie() : ListMovie =
7+
ListMovie(
8+
name = this.name
9+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.codandotv.streamplayerapp.domain
2+
3+
import com.codandotv.streamplayerapp.data.ListMovieRepository
4+
import com.codandotv.streamplayerapp.domain.model.ListMovie
5+
6+
interface ListMovieUseCase {
7+
fun getMovies() : ListMovie
8+
}
9+
10+
class ListMovieUseCaseImpl(
11+
private val repository: ListMovieRepository
12+
) : ListMovieUseCase{
13+
14+
override fun getMovies(): ListMovie =
15+
repository.getMovies()
16+
17+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.codandotv.streamplayerapp.domain.model
2+
3+
data class ListMovie(
4+
val name : String
5+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.codandotv.streamplayerapp.presentation
2+
3+
import android.os.Bundle
4+
import androidx.appcompat.app.AppCompatActivity
5+
6+
7+
class ListMovieActivity : AppCompatActivity(){
8+
val viewModel = ListMovieViewModel()
9+
10+
override fun onCreate(savedInstanceState: Bundle?) {
11+
super.onCreate(savedInstanceState)
12+
viewModel.curtaVideo()
13+
}
14+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package com.codandotv.streamplayerapp.presentation
2+
3+
class ListMovieUimodel {
4+
}

0 commit comments

Comments
 (0)