Skip to content

Instantly share code, notes, and snippets.

@barefeettom
Last active April 15, 2021 02:59
Show Gist options
  • Save barefeettom/6dda5e857664999a4ef27e40d27f95e2 to your computer and use it in GitHub Desktop.
Save barefeettom/6dda5e857664999a4ef27e40d27f95e2 to your computer and use it in GitHub Desktop.
extension Weather publisher. For article: https://medium.com/p/4ddf8710d1a0/
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