-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package me.nathanfallet.extopy.usecases.posts | ||
|
||
import me.nathanfallet.extopy.client.IExtopyClient | ||
import me.nathanfallet.extopy.models.posts.Post | ||
import me.nathanfallet.usecases.pagination.Pagination | ||
|
||
class FetchPostsUseCase( | ||
private val client: IExtopyClient, | ||
Check warning on line 8 in shared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/posts/FetchPostsUseCase.kt Codecov / codecov/patchshared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/posts/FetchPostsUseCase.kt#L7-L8
|
||
) : IFetchPostsUseCase { | ||
|
||
override suspend fun invoke(input: Pagination): List<Post> = client.posts.list(input) | ||
|
||
Check warning on line 12 in shared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/posts/FetchPostsUseCase.kt Codecov / codecov/patchshared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/posts/FetchPostsUseCase.kt#L11-L12
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package me.nathanfallet.extopy.usecases.posts | ||
|
||
import me.nathanfallet.extopy.models.posts.Post | ||
import me.nathanfallet.usecases.base.ISuspendUseCase | ||
import me.nathanfallet.usecases.pagination.Pagination | ||
|
||
interface IFetchPostsUseCase : ISuspendUseCase<Pagination, List<Post>> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package me.nathanfallet.extopy.usecases.users | ||
|
||
import me.nathanfallet.extopy.client.IExtopyClient | ||
import me.nathanfallet.extopy.models.users.User | ||
import me.nathanfallet.usecases.pagination.Pagination | ||
|
||
class FetchUsersUseCase( | ||
private val client: IExtopyClient, | ||
Check warning on line 8 in shared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/users/FetchUsersUseCase.kt Codecov / codecov/patchshared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/users/FetchUsersUseCase.kt#L7-L8
|
||
) : IFetchUsersUseCase { | ||
|
||
override suspend fun invoke(input: Pagination): List<User> = client.users.list(input) | ||
Check warning on line 11 in shared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/users/FetchUsersUseCase.kt Codecov / codecov/patchshared/src/commonMain/kotlin/me/nathanfallet/extopy/usecases/users/FetchUsersUseCase.kt#L11
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package me.nathanfallet.extopy.usecases.users | ||
|
||
import me.nathanfallet.extopy.models.users.User | ||
import me.nathanfallet.usecases.base.ISuspendUseCase | ||
import me.nathanfallet.usecases.pagination.Pagination | ||
|
||
interface IFetchUsersUseCase : ISuspendUseCase<Pagination, List<User>> |