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