Created
January 21, 2020 20:33
-
-
Save Plnda/6852ab7217ffb5dcb821b1f6558701e9 to your computer and use it in GitHub Desktop.
This file contains 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
import Foundation | |
enum OpenWeatherRoute { | |
case weather | |
} | |
extension OpenWeatherRoute: NetworkRoute { | |
var path: String { | |
switch self { | |
case .weather: | |
return "/weather?q={City}&units=metric&APPID={APPID}" | |
} | |
} | |
var method: NetworkMethod { | |
switch self { | |
case .weather: | |
return .get | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment