37 lines
888 B
Plaintext
37 lines
888 B
Plaintext
import LeadKit
|
|
import RxSwift
|
|
|
|
final class {{ module_info.name }}CursorConfiguration: TotalCountCursorConfiguration {
|
|
|
|
typealias ResultType = <#ResultType#>
|
|
|
|
private var page: Int = 1
|
|
|
|
init(<#arguments#>) {
|
|
//
|
|
}
|
|
|
|
init(resetFrom other: {{ module_info.name }}CursorConfiguration) {
|
|
//
|
|
}
|
|
|
|
func resultSingle() -> Single<ResultType> {
|
|
return NetworkService.shared
|
|
.listing(page: page)
|
|
.do(onSuccess: { [weak self] _ in
|
|
self?.page += 1
|
|
})
|
|
}
|
|
|
|
}
|
|
|
|
typealias {{ module_info.name }}Cursor = TotalCountCursor<{{ module_info.name }}CursorConfiguration>
|
|
|
|
extension TotalCountCursor where CursorConfiguration == {{ module_info.name }}CursorConfiguration {
|
|
|
|
convenience init(<#arguments#>) {
|
|
self.init(configuration: {{ module_info.name }}CursorConfiguration(<#arguments#>))
|
|
}
|
|
|
|
}
|