mirror of
https://github.com/lux-tel/session-ios.git
synced 2026-10-30 20:38:32 +00:00
• Cleaned up API structures to be more consistent • Moved OpenGroupAPI into SessionNetworkingKit • Moved PushNotificationAPI into SessionNetworkingKit • Renamed to OpenGroupAPI to SOGSAPI
24 lines
566 B
Swift
24 lines
566 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
extension Network.SnodeAPI {
|
|
struct OxenDaemonRPCRequest<T: Encodable>: Encodable {
|
|
private enum CodingKeys: String, CodingKey {
|
|
case endpoint
|
|
case body = "params"
|
|
}
|
|
|
|
private let endpoint: String
|
|
private let body: T
|
|
|
|
public init(
|
|
endpoint: Network.SnodeAPI.Endpoint,
|
|
body: T
|
|
) {
|
|
self.endpoint = endpoint.path
|
|
self.body = body
|
|
}
|
|
}
|
|
}
|