暂无描述

PhotoGroupDetailRepository.swift 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // PhotoGroupDetailRepository.swift
  3. // PaiaiDataKit
  4. //
  5. // Created by ffib on 2018/12/25.
  6. // Copyright © 2018 yb. All rights reserved.
  7. //
  8. import Foundation
  9. import RxCocoa
  10. import RxSwift
  11. struct PhotoGroupDetailRepository: GroupDetailRepository {
  12. var groupDetailRemoteAPI: GroupDetailRemoteAPI
  13. init(groupId: String) {
  14. groupDetailRemoteAPI = GroupDetailRemoteAPI(groupId: groupId)
  15. }
  16. func load() -> Single<GroupDetailItem> {
  17. return groupDetailRemoteAPI.loadContent()
  18. }
  19. func quit() -> Completable {
  20. return groupDetailRemoteAPI.quit()
  21. }
  22. func lock() -> Completable {
  23. return groupDetailRemoteAPI.lock()
  24. }
  25. func unlock() -> Completable {
  26. return groupDetailRemoteAPI.unlock()
  27. }
  28. func update(name: String) -> Completable {
  29. return groupDetailRemoteAPI.update(name: name)
  30. }
  31. func removeMember(userId: String) -> Completable {
  32. return groupDetailRemoteAPI.remove(userId: userId)
  33. }
  34. }