Swiftpack.co -  stuartbreckenridge/SGDataGovModels as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
stuartbreckenridge/SGDataGovModels
This package contains the necessary structs and Publishers for each of the NEA API endpoints supported by the data.gov.sg portal.
.package(url: "https://github.com/stuartbreckenridge/SGDataGovModels.git", from: "0.0.8")

SGDataGovModels

This package contains the necessary structs and Publishers for each of the NEA API endpoints supported by the data.gov.sg portal.

Usage

Include this Package as a dependency: File > Swift Packages > Add Package Dependency.

Data provided by the National Environmental Agency is available via the NEAPublishers class.

Example


var sink: AnyCancellable!

sink = NEAPublishers.pm25.receive(on: RunLoop.main).sink(receiveCompletion: { (result) in
    switch result {
    case .failure(let err):
        // handle error
    case .finished:
        // finished
    }
}, receiveValue: { (downloadedPM25Data) in
    // do something with the data
})

GitHub

link
Stars: 0
Last commit: 1 year ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics