InteractionEndpoint.swift
855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// InteractionEndpoint.swift
// hippo
//
// Created by shihao on 2025/7/1.
//
import Foundation
enum InteractionEndpoint: APIEndpoint {
case sendInteraction(actionType: InteractionActionType)
var path: String {
switch self {
case .sendInteraction:
return "/client/doublefeel/interaction/action/"
}
}
var method: HTTPMethod {
switch self {
case .sendInteraction:
return .post
}
}
var parameters: [String: Any]? {
switch self {
case .sendInteraction(let actionType):
return ["interaction_type": 0,
"action_type": actionType.rawValue]
}
}
var encoding: ParameterEncoding {
switch self {
case .sendInteraction:
return .json
}
}
}