要运行示例项目,请先克隆仓库,然后从 Example 目录中运行 pod install
。
let skippy: Skiplagged = Skiplagged()
skippy.getAirportCodesByHint("Lux", result: { (array:[SLAirport]?, error:NSError?) -> Void in
// Do whatever you want with the array
})
skippy.getFlights(SLAirport(code: "HAM", name: nil), to: SLAirport(code: "LUX", name: nil), departureDate: NSDate().dateByAddingTimeInterval(43200), returnDate: NSDate().dateByAddingTimeInterval(43200 * 8), sort: .Pricing, result: { (airlines, trips, depart, cities, error) -> Void in
// If you want to get return flights as well...
skippy.getReturnFlights((trips?.first)!, returnDate: NSDate().dateByAddingTimeInterval(43200 * 8), sort: .Pricing, result: { (airlines, flights, depart, cities, error) -> Void in
})
})
Skiplagged 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中。
pod "Skiplagged"
Bilge Taylan Ulusoy, [email protected]
Skiplagged 以 MIT 许可证提供。有关更多信息,请参阅 LICENSE 文件。