feat(content): 추천 오디오 탭을 추가한다
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import Foundation
|
||||
import Moya
|
||||
|
||||
enum MainContentRecommendationApi {
|
||||
case getAudioRecommendations
|
||||
}
|
||||
|
||||
extension MainContentRecommendationApi: TargetType {
|
||||
var baseURL: URL {
|
||||
return URL(string: BASE_URL)!
|
||||
}
|
||||
|
||||
var path: String {
|
||||
switch self {
|
||||
case .getAudioRecommendations:
|
||||
return "/api/v2/audio/recommendations"
|
||||
}
|
||||
}
|
||||
|
||||
var method: Moya.Method {
|
||||
switch self {
|
||||
case .getAudioRecommendations:
|
||||
return .get
|
||||
}
|
||||
}
|
||||
|
||||
var task: Moya.Task {
|
||||
switch self {
|
||||
case .getAudioRecommendations:
|
||||
return .requestPlain
|
||||
}
|
||||
}
|
||||
|
||||
var headers: [String: String]? {
|
||||
return ["Authorization": "Bearer \(UserDefaults.string(forKey: UserDefaultsKey.token))"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user