-
Notifications
You must be signed in to change notification settings - Fork 129
/
GetBufferoos.kt
23 lines (19 loc) · 1.04 KB
/
GetBufferoos.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package org.buffer.android.boilerplate.domain.interactor.browse
import io.reactivex.Flowable
import org.buffer.android.boilerplate.domain.executor.PostExecutionThread
import org.buffer.android.boilerplate.domain.executor.ThreadExecutor
import org.buffer.android.boilerplate.domain.interactor.FlowableUseCase
import org.buffer.android.boilerplate.domain.model.Bufferoo
import org.buffer.android.boilerplate.domain.repository.BufferooRepository
import javax.inject.Inject
/**
* Use case used for retreiving a [List] of [Bufferoo] instances from the [BufferooRepository]
*/
open class GetBufferoos @Inject constructor(val bufferooRepository: BufferooRepository,
threadExecutor: ThreadExecutor,
postExecutionThread: PostExecutionThread):
FlowableUseCase<List<Bufferoo>, Void?>(threadExecutor, postExecutionThread) {
public override fun buildUseCaseObservable(params: Void?): Flowable<List<Bufferoo>> {
return bufferooRepository.getBufferoos()
}
}