Last active
April 15, 2021 02:59
-
-
Save barefeettom/6dda5e857664999a4ef27e40d27f95e2 to your computer and use it in GitHub Desktop.
extension Weather publisher. 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 Combine | |
extension Weather { | |
static func publisher( | |
city: String, | |
countryCode: String?, | |
system: System | |
) { | |
publisher( | |
keyValues: [ | |
.appID: "1234567890abcdef", | |
.site: [city, countryCode] | |
.compactMap { $0 } | |
.joined(separator: ","), | |
.system: system | |
] | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment