Skip to content

Instantly share code, notes, and snippets.

@ekscrypto
Created February 21, 2019 01:09
Show Gist options
  • Save ekscrypto/31e32fa4b840277a23ad36ec1898c6bd to your computer and use it in GitHub Desktop.
Save ekscrypto/31e32fa4b840277a23ad36ec1898c6bd to your computer and use it in GitHub Desktop.
import Foundation
protocol APIEndpoint {
func endpoint() -> String
}
class APIRequest {
struct ErrorResponse: Codable {
let status: String
let code: Int
let message: String
}
enum APIError: Error {
case invalidEndpoint
case errorResponseDetected
case noData
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment