Created
November 14, 2018 21:40
-
-
Save pzmudzinski/a7e7b0479f9c90c9fd7498b2872d2ce1 to your computer and use it in GitHub Desktop.
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
class DummyApi: Api { | |
var userBooks = "Book 1", "Book 2", "Book 3" | |
func getBooks() -> Observable<[Book]> { | |
return userBooks | |
} | |
func deleteBook(_ book: Book) -> Single<Book> { | |
...wait 0.5s... | |
userBooks.remove(book) | |
...userBooks emits onNext... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment