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.

47 lines
956 B

5 years ago
5 years ago
5 years ago
5 years ago
  1. //
  2. // AddressSearchInteractor.swift
  3. // GME Remit
  4. //
  5. // Created by InKwon Devik Kim on 22/04/2019.
  6. //Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class SearchAddressInteractor {
  10. // MARK: Properties
  11. weak var output: SearchAddressInteractorOutput?
  12. private let service: SearchAddressServiceType
  13. // MARK: Initialization
  14. init(service: SearchAddressServiceType) {
  15. self.service = service
  16. }
  17. // MARK: Converting entities
  18. }
  19. // MARK: AddressSearch interactor input interface
  20. extension SearchAddressInteractor: SearchAddressInteractorInput {
  21. func fetchAddress(
  22. pageIndex: Int,
  23. interval: Int,
  24. keyword: String
  25. ) {
  26. self.service.fetchAddress(
  27. pageIndex: pageIndex,
  28. interval: interval,
  29. keyword: keyword,
  30. success: {
  31. self.output?.setJusoModel(with: $0)
  32. },
  33. failure: {
  34. self.output?.failure(with: $0)
  35. }
  36. )
  37. }
  38. }