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