Swift Package Index


Swift package to process data from aviationweather.gov.


  • The latest stable release is 0.0.7. Released 7 months ago.
  • The last commit to master was 7 months ago.

Swift Version Compatibility

  • 0.0.7 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.0.7 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

AvWeather

AvWeather is a Swift package allowing you to retrieve and use data from aviationweather.gov.

Usage

import AvWeather

let avWeatherClient = ADDSClient()

// send a request for METAR data for Boston Logan Airport (KBOS)
avWeatherClient.send(MetarRequest(forStation: "KBOS")) { response in 
    switch response {
    case .success(let metars):
        // do something with new METAR data
        print(metars[0].rawText)
        
    case .failure(let error):
        // request failed
        print(error.localizedDescription)
    }
}

// send a request for METAR data at multiple stations
avWeatherClient.send(MetarRequest(forStations: ["KBOS", "KORD", "KLAX"])) { response in
    switch response {
    case .success(let metars):
        // do something with new METAR data
        print(metars[0].rawText)
        
    case .failure(let error):
        // request failed
        print(error.localizedDescription)
    }
}