Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ”€ :: (#553) Playlist ๋„๋ฉ”์ธ์„ v3๋กœ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค. #559

Merged
merged 35 commits into from
Jun 3, 2024

Conversation

yongbeomkwak
Copy link
Member

๐Ÿ’ก ๋ฐฐ๊ฒฝ ๋ฐ ๊ฐœ์š”

  • ์™๋ฎค v3 api๋กœ playlist ๋„๋ฉ”์ธ์„ ์ตœ์‹ ํ™”ํ•ฉ๋‹ˆ๋‹ค.

Resolves: #553

๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

  • ํ˜„์žฌ๊นŒ์ง€ ์ž‘์—…๋œ playlist ๋„๋ฉ”์ธ api๋กœ ์ตœ์‹ ํ™” ํ•ฉ๋‹ˆ๋‹ค.
  • Entity ๋ณ€ํ™”์— ๋”ฐ๋ฅธ ๋น„์ง€๋‹ˆ์Šค๋กœ์ง์„ ์ตœ์‹ ํ™” ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ™‹โ€โ™‚๏ธ ๋ฆฌ๋ทฐ๋…ธํŠธ

๊ตฌํ˜„ ์‹œ์— ๊ณ ๋ฏผ์ด์—ˆ๋˜ ์ ๋“ค ํ˜น์€ ํŠน์ • ๋ถ€๋ถ„์— ๋Œ€ํ•œ ์˜๋„๊ฐ€ ์žˆ์—ˆ๋‹ค๋ฉด PR ๋ฆฌ๋ทฐ์˜ ์ดํ•ด๋ฅผ ๋•๊ธฐ ์œ„ํ•ด ์„œ์ˆ ํ•ด์ฃผ์„ธ์š”!

๋˜ํ•œ ๋ฆฌ๋ทฐ์–ด์—๊ฒŒ ํŠน์ • ๋ถ€๋ถ„์— ๋Œ€ํ•œ ์ง‘์ค‘ ํ˜น์€ ์ฝ”๋ฉ˜ํŠธ ํ˜น์€ ์งˆ๋ฌธ์„ ์š”์ฒญํ•˜๋Š” ๊ฒฝ์šฐ์— ์ž‘์„ฑํ•˜๋ฉด ์ข‹์•„์š”!

e.g. ์ž‘์—…์„ ๋๋‚ด์•ผํ•  ์‹œ๊ฐ„์ด ์–ผ๋งˆ ์—†์–ด ํ™•์žฅ์„ฑ๋ณด๋‹ค๋Š” ๋™์ž‘์„ ์œ„์ฃผ๋กœ ๋งŒ๋“ค์—ˆ์–ด์š”! ๊ฐ์•ˆํ•˜๊ณ  ๋ฆฌ๋ทฐํ•ด์ฃผ์„ธ์š”!

โœ… PR ์ฒดํฌ๋ฆฌ์ŠคํŠธ

ํ…œํ”Œ๋ฆฟ ์ฒดํฌ๋ฆฌ์ŠคํŠธ ๋ง๊ณ ๋„ ์ถ”๊ฐ€์ ์œผ๋กœ ํ•„์š”ํ•œ ์ฒดํฌ๋ฆฌ์ŠคํŠธ๋Š” ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”!

  • ์ด ์ž‘์—…์œผ๋กœ ์ธํ•ด ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•œ ๋ฌธ์„œ๊ฐ€ ๋ณ€๊ฒฝ๋˜์—ˆ๋‚˜์š”? (e.g. XCConfig, ๋…ธ์…˜, README)
  • ์ด ์ž‘์—…์„ ํ•˜๊ณ ๋‚˜์„œ ๊ณต์œ ํ•ด์•ผํ•  ํŒ€์›๋“ค์—๊ฒŒ ๊ณต์œ ๋˜์—ˆ๋‚˜์š”? (e.g. "API ๊ฐœ๋ฐœ ์™„๋ฃŒ๋์–ด์š”", "XCConfig ๊ฐ’ ์ถ”๊ฐ€๋˜์—ˆ์–ด์š”")
  • ์ž‘์—…ํ•œ ์ฝ”๋“œ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋‚˜์š”?
  • Merge ๋Œ€์ƒ ๋ธŒ๋žœ์น˜๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ๊ฐ€์š”?
  • PR๊ณผ ๊ด€๋ จ ์—†๋Š” ์ž‘์—…์ด ์žˆ์ง€๋Š” ์•Š๋‚˜์š”?

๐ŸŽธ ๊ธฐํƒ€

@yongbeomkwak yongbeomkwak requested a review from baekteun as a code owner June 2, 2024 15:19
Copy link

github-actions bot commented Jun 2, 2024

โœ… Successful finished SwiftLint

@yongbeomkwak yongbeomkwak changed the title ๐Ÿ”€ :: (#553) ๊ฒ€์ƒ‰ ์ „ ํ™”๋ฉด์„ v3 ๋ฒ„์ „์œผ๋กœ ๋ฆฌ๋‰ด์–ผํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ”€ :: (#553) Playlist ๋„๋ฉ”์ธ์„ v3๋กœ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค. Jun 2, 2024
Base automatically changed from 549-renewal-before-search to develop June 2, 2024 15:25
}
}

var loadPlayListUseCase: any LoadPlayListUseCase {
var updateTitleAndPrivateeUseCase: any UpdateTitleAndPrivateeUseCase {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateTitleAndPrivateeUseCase
Private"e" ๋„ค์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—‡ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

import Foundation

public enum UploadImageType {
case `default`(data: String)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data๋ณด๋‹ค๋Š” imageName ์ด๋Ÿฐ์‹ ์–ด๋–ค๊ฐ€์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฐ˜์˜ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ~


public enum UploadImageType {
case `default`(data: String)
case custom (data: Data)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํŒŒ์ผ์ด๋ฆ„๊ฐ™์€๊ฑฐ๋„ ๋ฐ›๋Š”๊ฑฐ ์–ด๋–ค๊ฐ€์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํŒŒ์ผ์ด๋ฆ„์ด์š” ?? ์„œ๋ฒ„์— ๋ณด๋‚ผ ๋•Œ ์“ฐ์ง€ ์•Š๋Š”๋ฐ ๋ฐ›์„ ํ•„์š”๊ฐ€ ์žˆ๋‚˜์š”?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํŒŒ์ผ ์ด๋ฆ„ ์•ˆ๋ณด๋‚ด๋ฉด ์„œ๋ฒ„์—์„œ 500๋„์›Œ์š”

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ”„๋ ˆ์ž„์›Œํฌ๋‹จ์—์„œ ํ„ฐ์ ธ์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ  ์–ด๋–ค์‹์œผ๋กœ ํ•˜ํ˜ ์ข‹์„๊นŒ์š” ??
default๋Š” ์ €ํฌ๊ฐ€ ์ œ๊ณตํ•ด์ฃผ๋Š” ๊ธฐ๋ณธ ์ด๋ฏธ์ง€๋“ค์ด๊ณ 
custom์ด ๊ฐค๋Ÿฌ๋ฆฌ์—์„œ ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ๋“ค์ธ๋ฐ

import RxSwift

public protocol UploadPlaylistImageUseCase {
func execute(key: String, model: UploadImageType) -> Single<BaseImageEntity>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ทธ๋ƒฅ String ๋ฆฌํ„ดํ•˜๋Š”๊ฑฐ ์–ด๋–ค๊ฐ€์š”? ๊ฐ์Œ€ํ•„์š”๊ฐ€ ์žˆ์„๊นŒ ๋ผ๋Š” ์ƒ๊ฐ์ด ๋“œ๋„ค์š”.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—‡ ์ €๋Š” ํ†ต์ผ์„ฑ ๋•Œ๋ฌธ์— ์“ฐ๊ธดํ–ˆ๋Š”๋ฐ.. ๊ทธ๊ฒŒ ๋‚˜์„๊นŒ์š” ??

case fetchPlaylistSongs(key: String) // ์ „์ฒด ์žฌ์ƒ ์‹œ ๊ณก ๋ฐ์ดํ„ฐ๋งŒ ๊ฐ€์ ธ์˜ค๊ธฐ
case addSongIntoPlayList(key: String, songs: [String]) // ๊ณก ์ถ”๊ฐ€
case updatePlaylist(key: String, songs: [String]) // ์ตœ์ข… ์ €์žฅ
case removeSongs(key: String, songs: String)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

songs๋Š” [String]์œผ๋กœ ๋ฐ›๊ณ  task ์ •์˜ํ• ๋•Œ .join(",") ํ•˜๋Š”๊ฑฐ ์–ด๋–ค๊ฐ€์š”, ์œ„์—๋น„ํ•ด ์ผ๊ด€์„ฑ์ด ์•ฝ๊ฐ„ ๋–จ์–ด์ ธ๋ณด์—ฌ์„œ์š”
ํ  ์• ๋งคํ•˜๊ธดํ•˜๋„ค์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฒ˜๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.

Comment on lines 116 to 120
datas.append(MultipartFormData(provider: .data("default".data(using: .utf8)!), name: "type"))
datas.append(MultipartFormData(provider: .data(data.data(using: .utf8)!), name: "imageName"))

case let .custom(data: data):
datas.append(MultipartFormData(provider: .data("custom".data(using: .utf8)!), name: "type"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

! ๋“ค์ด ์ข€ ๋งŽ์ด ๋ถˆํŽธํ•˜๊ธดํ•˜๋„ค์š”, ํ™•์ •์ ์ด๋ผํ•ด๋„. ์ฝ”๋“œ์ƒ์ด !๊ฐ€ ์—ฌ๋Ÿฟ ์žˆ๋‹ค๋Š”๊ฑฐ๋งŒํ•ด๋„ !๋ฅผ ์“ฐ๋Š”๊ฒŒ ๋‹น์—ฐ์‹œ๋˜๋Š” ๊ทธ๋Ÿฐ ํšจ๊ณผ๊ฐ€ ์ƒ๊ธธ๊ฑฐ๊ฐ™์•„์„œ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ .. ๊ทธ๋Ÿฌ๋ฉด ?? ์—ฐ์‚ฐ์ž๋ฅผ ์“ธ๊นŒ์š”?

Comment on lines 16 to 20
public let key: String?
public let title: String
public let songs: [SingleSongResponseDTO]?
public let image: SinglePlayListDetailResponseDTO.Image
}

public extension SinglePlayListDetailResponseDTO {
struct Image: Decodable {
public let round: Int?
public let square: Int?
public let name: String?
public let version: Int?
}
public let imageUrl: String?
public let `private`: Bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key๋‚˜ imageUrl์ด ์˜ต์…”๋„์ธ ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?

@@ -27,7 +27,7 @@ public final class PlayListDetailComponent: Component<PlayListDetailDependency>,
key: id,
type: isCustom ? .custom : .wmRecommend,
fetchPlayListDetailUseCase: dependency.fetchPlayListDetailUseCase,
editPlayListUseCase: dependency.editPlayListUseCase,
updatePlaylistUseCase: dependency.updatePlaylistUseCase,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ .. ๋‹น์žฅ ๋ฐ˜์˜๋˜์–ด์•ผํ•œ๋‹ค๋Š”๊ฑด ์•„๋‹Œ๋ฐ ์–ด๋””๋Š” Play"L"ist ์–ด๋””๋Š” Play"l"ist ์ข€ ์—ฌ๋Ÿฌ์‹์œผ๋กœ ํ˜ผ์šฉ๋˜๊ณ  ์žˆ๋Š”๊ฑฐ๊ฐ™๋„ค์š”, ํ•œ๋ฒˆ ์ •ํ•˜๋Š” ์‹œ๊ฐ„์ด ์žˆ๋Š”๊ฒŒ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—‡ .. ๊ทธ๋Ÿฌ๋„ค์š” ์ „์— ๋ง์”€๋“œ๋ฆฐ ์—์…‹ ์ •๋ฆฌํ•  ๋•Œ ํ•œ๋ฒˆ ํ•ด์•ผ๊ฒ ๋„ค์š” ..

@yongbeomkwak yongbeomkwak merged commit 87a0b65 into develop Jun 3, 2024
2 of 3 checks passed
@yongbeomkwak yongbeomkwak deleted the 553-update-playlist-domain branch June 3, 2024 10:50
Comment on lines +63 to +66
let .removeSongs(
key: key,
_
):
Copy link
Member

@baekteun baekteun Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด ์นœ๊ตฌ ๋ญ ๋ณ€์ˆ˜์ธ์ค„ ์•Œ์•˜๋Š”๋ฐ case๋ณ„๋กœ ์ค„๋ฐ”๊ฟˆ ํ•œ๊ฑฐ๋„ค์š”? ๊ฐ€๋…์„ฑ์„ ์ €ํ•ดํ•˜๋Š”๊ฑฐ๊ฐ™์•„์„œ ์ด์นœ๊ตฌ๋„ ๊ทธ๋ƒฅ ํ•œ ๋ผ์ธ์— ๋‘๋Š”๊ฒŒ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค์ž‰ ์ด๊ฑฐ ์ œ๊ฐ€ ์•ˆํ–ˆ์–ด์š” ใ…‹ใ…‹ใ…‹ ํฌ๋งทํŒ…์ด ๋ฒ”์ธ์ž…๋‹ˆ๋‹ค !

provider: .data(data),
name: "imageFile",
fileName: "image.jpeg",
mimeType: "image/jpeg, image/jpg, image/png"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mimeType ์ด๊ฑฐ,, ์ด๋ ‡๊ฒŒ ํ•ด๋„,, ๋˜๋‚˜์š”..? mimeType์€ optional์ด๋ผ ์•ˆ๋ณด๋‚ด๋„ ๋ฌธ์ œ๊ฐ€ ์—†์—ˆ๋Š”๋ฐ ํ˜•์‹์€ nest์—์„œ ์–ด๋–ป๊ฒŒ ์ฒ˜๋ฆฌ๋˜๋Š”์ง€๋Š” ๋ชจ๋ฅด๊ฒ ๋„ค์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ  ๊ทธ๋Ÿฌ๋ฉด ์ผ๋‹จ ๋นผ๋ณผ๊ป˜์š” ๊ฒ€์ƒ‰์—์„œ ์ฐธ๊ณ ํ–ˆ๋˜๊ฒŒ ๋‹ค ๋ช…์‹œ๋ฅผ ํ•ด์ค˜๊ฐ€์ง€๊ณ 

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ณด๋‚ผ๊ฑฐ๋ฉด 1๊ฐœ๋งŒ,, ์ €๋Ÿฐ ์ŠคํŠธ๋ง ์…‹ํŠธ๋ฅผ ๋ณด๋‚ธ์ ์ด ์—†์–ด์„œ ๋ชจ๋ฅด๊ฒ ๋„ค์š”.

datas.append(MultipartFormData(
provider: .data("default".data(using: .utf8)!),
name: "type",
fileName: "ใ……"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—ฌ๊ธฐ๋Š” ๊ทธ๋ƒฅ ์ง€์šฐ์…”๋„ ๋ ๊ฑฐ๊ฐ™์•„์š”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ œ๊ฑฐํ–ˆ์Šต๋‹ˆ๋‹ค.

}

public let status: Int
public let added_songs_length: Int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—„ snake_case๋„ค์š”,

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PlaylistDomain - API ๋ณ€๊ฒฝ์‚ฌํ•ญ ๋ฐ˜์˜
3 participants