feat(chat-talk): 톡 목록 조회 API 연동 및 목록 UI 구성

This commit is contained in:
Yu Sung
2025-08-29 22:25:12 +09:00
parent 4dd1866169
commit 6afe04048f
6 changed files with 251 additions and 9 deletions

View File

@@ -0,0 +1,42 @@
//
// TalkApi.swift
// SodaLive
//
// Created by klaus on 8/29/25.
//
import Foundation
import Moya
enum TalkApi {
case getTalkRooms
}
extension TalkApi: TargetType {
var baseURL: URL { URL(string: BASE_URL)! }
var path: String {
switch self {
case .getTalkRooms:
return "/api/chat/room/list"
}
}
var method: Moya.Method {
switch self {
case .getTalkRooms:
return .get
}
}
var task: Moya.Task {
switch self {
case .getTalkRooms:
return .requestPlain
}
}
var headers: [String : String]? {
["Authorization": "Bearer \(UserDefaults.string(forKey: UserDefaultsKey.token))"]
}
}