메인 라이브 탭 - 커뮤니티 포스트 영역 추가

This commit is contained in:
Yu Sung
2023-12-21 23:46:22 +09:00
parent 7bd32f8486
commit acdacbfb7b
8 changed files with 128 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ enum CreatorCommunityApi {
case getCommunityPostCommentList(postId: Int, page: Int, size: Int)
case getCommentReplyList(commentId: Int, page: Int, size: Int)
case modifyComment(request: ModifyCommunityPostCommentRequest)
case getLatestPostListFromCreatorsYouFollow
}
extension CreatorCommunityApi: TargetType {
@@ -44,6 +45,9 @@ extension CreatorCommunityApi: TargetType {
case .getCommunityPostDetail(let postId):
return "/creator-community/\(postId)"
case .getLatestPostListFromCreatorsYouFollow:
return "/creator-community/latest"
}
}
@@ -52,7 +56,7 @@ extension CreatorCommunityApi: TargetType {
case .createCommunityPost, .communityPostLike, .createCommunityPostComment:
return .post
case .getCommunityPostList, .getCommunityPostCommentList, .getCommentReplyList, .getCommunityPostDetail:
case .getCommunityPostList, .getCommunityPostCommentList, .getCommentReplyList, .getCommunityPostDetail, .getLatestPostListFromCreatorsYouFollow:
return .get
case .modifyComment, .modifyCommunityPost:
@@ -107,6 +111,10 @@ extension CreatorCommunityApi: TargetType {
case .getCommunityPostDetail:
let parameters = ["timezone": TimeZone.current.identifier] as [String: Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getLatestPostListFromCreatorsYouFollow:
let parameters = ["timezone": TimeZone.current.identifier] as [String: Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
}
}