Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import Foundation
  2.  
  3. protocol APIEndpoint {
  4. func endpoint() -> String
  5. }
  6.  
  7. class APIRequest {
  8. struct ErrorResponse: Codable {
  9. let status: String
  10. let code: Int
  11. let message: String
  12. }
  13.  
  14. enum APIError: Error {
  15. case invalidEndpoint
  16. case errorResponseDetected
  17. case noData
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement