Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trupin/51fa324385c9435860a70387d54c9e65 to your computer and use it in GitHub Desktop.
Save trupin/51fa324385c9435860a70387d54c9e65 to your computer and use it in GitHub Desktop.
protocol MovieManaging {
/// Fetches popular movies from the server, then stores them.
func getPopularMovies(_ completion: @escaping (Result<[Movie], MovieManagerError>) -> Void)
/// Fetches a movie from the store if it exists, from the server otherwise.
func getMovie(id movieID: String, completion: @escaping (Result<Movie, MovieManagerError>) -> Void)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment