-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
001adf9
commit bf404d9
Showing
6 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
domain/src/main/java/com/matias/domain/usecases/GetPagedKotlinReposUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.matias.domain.usecases | ||
|
||
import com.matias.domain.repositories.GithubRepository | ||
import javax.inject.Inject | ||
|
||
class GetPagedKotlinReposUseCase @Inject constructor( | ||
private val repo: GithubRepository | ||
) { | ||
operator fun invoke() = repo.getKotlinRepos() | ||
} |
11 changes: 11 additions & 0 deletions
11
domain/src/main/java/com/matias/domain/usecases/GetRepoUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.matias.domain.usecases | ||
|
||
import com.matias.domain.repositories.GithubRepository | ||
import javax.inject.Inject | ||
|
||
class GetRepoUseCase @Inject constructor( | ||
private val repository: GithubRepository, | ||
) { | ||
suspend operator fun invoke(owner: String, name: String) = | ||
repository.getKotlinRepo(owner, name) | ||
} |
11 changes: 11 additions & 0 deletions
11
domain/src/main/java/com/matias/domain/usecases/SearchReposUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.matias.domain.usecases | ||
|
||
import com.matias.domain.repositories.GithubRepository | ||
import javax.inject.Inject | ||
|
||
class SearchReposUseCase @Inject constructor( | ||
private val repo: GithubRepository | ||
) { | ||
|
||
operator fun invoke(query: String) = repo.searchKotlinRepos(query) | ||
} |