Created
June 29, 2018 07:33
-
-
Save bobgodwinx/9ecfa6d27c309399c50020e848521c46 to your computer and use it in GitHub Desktop.
OST05
This file contains 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
/// `Model` | |
struct Model: ModelType { | |
let datasource: Observable<Resource> | |
init() { | |
let url = URL(string: "https://media.giphy.com/media/5z08WdHr0h9SHZekve/giphy.gif")! | |
let request = URLRequest(url: url) | |
self.datasource = URLSession.shared.rx | |
.response(request: request) | |
.share(replay: 1, scope: .forever) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment