Created
August 20, 2017 10:05
-
-
Save Herakleis/403babc2feb74dc7f4fd219d6d77ca08 to your computer and use it in GitHub Desktop.
ServiceType2+FriendRequests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RxSwift | |
protocol UsersBaseServiceType { | |
func observeCurrentFriendRequests() -> Observable<YourDatabaseResultType> | |
} | |
final class UsersBaseService { | |
static let shared = UsersBaseService() | |
fileprivate let usersProvider = YourDatabaseProvider() | |
private init() { } | |
} | |
extension UsersBaseService: UsersBaseServiceType { | |
func observeCurrentFriendRequests() -> Observable<YourDatabaseResultType> { | |
// Your implementation with your specific usersProvider | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment