Skip to content

Instantly share code, notes, and snippets.

View siddheshredkar's full-sized avatar
🌴
On vacation

Siddhesh Redkar siddheshredkar

🌴
On vacation
  • Mumbai
View GitHub Profile
class FeedStore: FeedService {
static let shared = FeedStore()
private init() {}
func fetchFeeds(from endpoint: FeedListEndpoint, completion: @escaping (Result<Feed, APIError>) -> ()) {
print("\(APIPath().feed)\(endpoint.rawValue)")
guard let url = URL(string: "\(APIPath().feed)\(endpoint.rawValue)") else {
completion(.failure(.invalidEndpoint))
return