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
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... |
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
protocol Api { | |
func getBooks() -> Observable<[Book]> | |
func deleteBook(_ book: Book) -> Single<Book> | |
} |
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
struct Book { | |
let title: String | |
} |
NewerOlder