Fix APIv2_13 identifiers
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// APIv2_12.swift
|
||||
// APIv2_13.swift
|
||||
// iKeyMon
|
||||
//
|
||||
// Created by tracer on 13.11.25.
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension APIv2_12 {
|
||||
extension APIv2_13 {
|
||||
struct Load: Codable {
|
||||
let current: LoadMetrics
|
||||
let historical: [LoadMetrics]
|
||||
@@ -125,16 +125,16 @@ extension APIv2_12 {
|
||||
}
|
||||
}
|
||||
|
||||
class APIv2_12: BaseAPIClient, ServerAPIProtocol {
|
||||
typealias LoadType = APIv2_12.Load
|
||||
typealias MemoryType = APIv2_12.Memory
|
||||
typealias UtilizationType = APIv2_12.Utilization
|
||||
class APIv2_13: BaseAPIClient, ServerAPIProtocol {
|
||||
typealias LoadType = APIv2_13.Load
|
||||
typealias MemoryType = APIv2_13.Memory
|
||||
typealias UtilizationType = APIv2_13.Utilization
|
||||
|
||||
private enum Endpoint: String {
|
||||
case systemInfo = "/api/v2.12/system/info"
|
||||
case load = "/api/v2.12/metrics/load"
|
||||
case memory = "/api/v2.12/metrics/memory"
|
||||
case utilization = "/api/v2.12/metrics/utilization"
|
||||
case systemInfo = "/api/v2.13/system/info"
|
||||
case load = "/api/v2.13/metrics/load"
|
||||
case memory = "/api/v2.13/metrics/memory"
|
||||
case utilization = "/api/v2.13/metrics/utilization"
|
||||
|
||||
func url(baseURL: URL) -> URL {
|
||||
return baseURL.appendingPathComponent(self.rawValue)
|
||||
@@ -193,7 +193,7 @@ class APIv2_12: BaseAPIClient, ServerAPIProtocol {
|
||||
|
||||
// MARK: - Server Summary Mapping
|
||||
|
||||
private extension APIv2_12 {
|
||||
private extension APIv2_13 {
|
||||
struct ServerSummaryEnvelope: Decodable {
|
||||
let meta: Meta
|
||||
let operatingSystem: OperatingSystem?
|
||||
|
||||
Reference in New Issue
Block a user