Last active
May 21, 2021 00:42
-
-
Save barefeettom/074df8f75a5866ebacce6c5bf6332356 to your computer and use it in GitHub Desktop.
Fetchable Weather, for article: https://medium.com/p/4ddf8710d1a0/
This file contains hidden or 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 BFWFetch | |
struct Weather: Fetchable { | |
static let baseURL = URL(string: "https://api.openweathermap.org/data/2.5")! | |
enum Key: String, FetchKey { | |
case appID | |
case site = "q" | |
case system = "units" | |
} | |
typealias Fetched = Site | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment