You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
879 B

  1. //
  2. // ShowAPIPresenter.swift
  3. // GME Remit
  4. //
  5. // Created by Jeongbae Kong on 2020/04/08.
  6. //Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import RxSwift
  9. import RxCocoa
  10. class ShowAPIPresenter: ViewModelType {
  11. var interactor: ShowAPIInteractorInput?
  12. var wireframe: ShowAPIWireframeInput?
  13. struct Input {}
  14. struct Output {
  15. let isError: Driver<Error>
  16. let isProgress: Driver<Bool>
  17. }
  18. private let disposeBag = DisposeBag()
  19. private let progressLinker = PublishSubject<Bool>()
  20. private let errorLinker = PublishSubject<Error>()
  21. func transform(input: Input) -> Output {
  22. return Output(
  23. isError: errorLinker.asDriverOnErrorJustComplete(),
  24. isProgress: progressLinker.asDriverOnErrorJustComplete()
  25. )
  26. }
  27. }
  28. // MARK: ShowAPI interactor output interface
  29. extension ShowAPIPresenter: ShowAPIInteractorOutput {
  30. }