팔로잉 채널 전체 리스트 페이지 추가

This commit is contained in:
Yu Sung
2023-08-19 23:14:54 +09:00
parent 633e1bfd92
commit 78f80cebd5
9 changed files with 303 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import Foundation
import Moya
enum LiveRecommendApi {
case getFollowedCreatorAllList(page: Int, size: Int)
case getFollowedChannelList
case getRecommendChannelList
case getRecommendLive
@@ -21,6 +22,9 @@ extension LiveRecommendApi: TargetType {
var path: String {
switch self {
case .getFollowedCreatorAllList:
return "/live/recommend/following/channel/all/list"
case .getFollowedChannelList:
return "/live/recommend/following/channel/list"
@@ -34,7 +38,8 @@ extension LiveRecommendApi: TargetType {
var method: Moya.Method {
switch self {
case .getFollowedChannelList,
case .getFollowedCreatorAllList,
.getFollowedChannelList,
.getRecommendChannelList,
.getRecommendLive:
return .get
@@ -47,6 +52,15 @@ extension LiveRecommendApi: TargetType {
.getRecommendChannelList,
.getRecommendLive:
return .requestPlain
case .getFollowedCreatorAllList(let page, let size):
let parameters = [
"page": page - 1,
"size": size,
"timezone": TimeZone.current.identifier,
] as [String : Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
}
}