Skip to content

Commit

Permalink
Rename to TV for Paging sources
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezaeiii committed Nov 6, 2024
1 parent ee788cb commit e2edae0
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class AiringTodayTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
class AiringTodayTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.airingTodayTVSeries(page).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class DiscoverTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
class DiscoverTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.discoverTVSeries(page).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class OnTheAirTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
class OnTheAirTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.onTheAirTVSeries(page).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class PopularTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
class PopularTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.popularTVSeries(page).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class SearchTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService, private val query: String) :
class SearchTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService, private val query: String) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.searchTVSeries(page, query).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class SimilarTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService, private val tvId: Int) :
class SimilarTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService, private val tvId: Int) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.fetchSimilarTVSeries(tvId, page).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class TopRatedTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
class TopRatedTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.topRatedTVSeries(page).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sample.tmdb.data.response.asTVShowDomainModel
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource

class TrendingTvSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
class TrendingTVSeriesPagingSource(context: Context, private val tvShowApi: TVShowService) :
BasePagingSource<TVShow>(context) {
override suspend fun fetchItems(page: Int): List<TVShow> =
tvShowApi.trendingTVSeries(page).items.asTVShowDomainModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.AiringTodayTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.AiringTodayTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -16,5 +16,5 @@ class AiringTodayTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
AiringTodayTvSeriesPagingSource(context, tvShowApi)
AiringTodayTVSeriesPagingSource(context, tvShowApi)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.DiscoverTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.DiscoverTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -16,5 +16,5 @@ class DiscoverTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
DiscoverTvSeriesPagingSource(context, tvShowApi)
DiscoverTVSeriesPagingSource(context, tvShowApi)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.OnTheAirTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.OnTheAirTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -16,5 +16,5 @@ class OnTheAirTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
OnTheAirTvSeriesPagingSource(context, tvShowApi)
OnTheAirTVSeriesPagingSource(context, tvShowApi)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.PopularTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.PopularTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -16,5 +16,5 @@ class PopularTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
PopularTvSeriesPagingSource(context, tvShowApi)
PopularTVSeriesPagingSource(context, tvShowApi)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.SearchTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.SearchTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -15,5 +15,5 @@ SearchTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
SearchTvSeriesPagingSource(context, tvShowApi, query!!)
SearchTVSeriesPagingSource(context, tvShowApi, query!!)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.SimilarTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.SimilarTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -16,5 +16,5 @@ class SimilarTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
SimilarTvSeriesPagingSource(context, tvShowApi, id!!)
SimilarTVSeriesPagingSource(context, tvShowApi, id!!)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.TopRatedTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.TopRatedTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -16,5 +16,5 @@ class TopRatedTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
TopRatedTvSeriesPagingSource(context, tvShowApi)
TopRatedTVSeriesPagingSource(context, tvShowApi)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sample.tmdb.data.repository.tvshow.paging

import android.content.Context
import com.sample.tmdb.data.network.TVShowService
import com.sample.tmdb.data.paging.tvshow.TrendingTvSeriesPagingSource
import com.sample.tmdb.data.paging.tvshow.TrendingTVSeriesPagingSource
import com.sample.tmdb.domain.model.TVShow
import com.sample.tmdb.domain.paging.BasePagingSource
import com.sample.tmdb.domain.repository.BasePagingRepository
Expand All @@ -16,5 +16,5 @@ class TrendingTVSeriesPagingRepository @Inject constructor(
private val tvShowApi: TVShowService,
) : BasePagingRepository<TVShow>() {
override fun pagingSource(query: String?, id: Int?): BasePagingSource<TVShow> =
TrendingTvSeriesPagingSource(context, tvShowApi)
TrendingTVSeriesPagingSource(context, tvShowApi)
}

0 comments on commit e2edae0

Please sign in to comment.