ThemeEndpoint.swift
862 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
43
44
//
// ThemeEndpoint.swift
// hippo-watch Watch App
//
// Created by shihao on 2025/10/31.
//
import Foundation
enum ThemeEndpoint: APIEndpoint {
case getCurrentTheme(userId: Int?)
var path: String {
switch self {
case .getCurrentTheme:
return "/client/doublefeel/theme/v2/watch_theme/active/"
}
}
var method: HTTPMethod {
switch self {
case .getCurrentTheme:
return .get
}
}
var parameters: [String : Any]? {
switch self {
case .getCurrentTheme(let userId):
if let userId{
return ["query_user_id": userId]
}
return nil
}
}
var encoding: ParameterEncoding {
switch self {
case .getCurrentTheme:
return .url
}
}
}