ThemeEndpoint.swift 797 Bytes
//
//  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
        }
    }
    
}