Skip to content

Commit

Permalink
setting up API
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Jan 12, 2024
1 parent 87ab1f1 commit 1a2e82c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/IPSWDownloads/IPSWDownloads.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
import OpenAPIRuntime
import Foundation

enum FirmwareType : String {
case ipsw
case ota
}

/// A hand-written Swift API for the greeting service, one that doesn't leak any generated code.
public struct IPSWDownloads {

Expand All @@ -28,6 +33,15 @@ public struct IPSWDownloads {
)
)
}

func firmwaresForDevice(withIdentifier identifier: String, type: FirmwareType) async throws {
let input = Operations.firmwaresForDevice.Input(
path: .init(identifier: identifier),
query: .init(_type: type.rawValue)
)
let firmwares = try await self.underlyingClient.firmwaresForDevice(input)
//self.underlyingClient.firmwaresForDevice(Operations.firmwaresForDevice.Input)
}
//
// /// Fetches the customized greeting for the provided name.
// /// - Parameter name: The name for which to provide a greeting, or nil to get a default.
Expand Down

0 comments on commit 1a2e82c

Please sign in to comment.