Skip to content

Instantly share code, notes, and snippets.

@Plnda
Created January 21, 2020 20:33
Show Gist options
  • Save Plnda/6852ab7217ffb5dcb821b1f6558701e9 to your computer and use it in GitHub Desktop.
Save Plnda/6852ab7217ffb5dcb821b1f6558701e9 to your computer and use it in GitHub Desktop.
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