ThemeEndpoint.swift
797 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
//
// ThemeEndpoint.swift
// hippo-watch Watch App
//
// Created by shihao on 2025/10/31.
//
import Foundation
enum ThemeEndpoint: APIEndpoint {
case getCurrentTheme(isOther: Bool)
var path: String {
switch self {
case .getCurrentTheme:
return "/client/doublefeel/theme/watch_theme/active/"
}
}
var method: HTTPMethod {
switch self {
case .getCurrentTheme:
return .get
}
}
var parameters: [String : Any]? {
switch self {
case .getCurrentTheme(let isOther):
return ["is_other": isOther ? 1 : 0]
}
}
var encoding: ParameterEncoding {
switch self {
case .getCurrentTheme:
return .url
}
}
}