File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
apis/src/main/kotlin/org/yapp/apis/book/dto/response Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,11 @@ data class BookSearchResponse private constructor(
1414 val query : String? ,
1515 val searchCategoryId : Int? ,
1616 val searchCategoryName : String? ,
17- val books : List <BookSummaryDto >
17+ val books : List <BookSummary >
1818) {
19-
20-
2119 companion object {
2220 fun from (response : AladinSearchResponse ): BookSearchResponse {
23- val books = response.item?.mapNotNull { BookSummaryDto .fromAladinItem(it) } ? : emptyList()
21+ val books = response.item?.mapNotNull { BookSummary .fromAladinItem(it) } ? : emptyList()
2422 return BookSearchResponse (
2523 version = response.version,
2624 title = response.title,
@@ -37,21 +35,19 @@ data class BookSearchResponse private constructor(
3735 }
3836 }
3937
40- data class BookSummaryDto private constructor(
38+ data class BookSummary private constructor(
4139 val isbn : String ,
4240 val title : String ,
4341 val author : String? ,
4442 val publisher : String? ,
4543 val coverImageUrl : String? ,
4644 ) {
47-
4845 companion object {
49-
5046 private val unknownTitle = " 제목없음"
5147
52- fun fromAladinItem (item : BookItem ): BookSummaryDto ? {
48+ fun fromAladinItem (item : BookItem ): BookSummary ? {
5349 val isbn = item.isbn ? : item.isbn13 ? : return null
54- return BookSummaryDto (
50+ return BookSummary (
5551 isbn = isbn,
5652 title = item.title ? : unknownTitle,
5753 author = item.author,
You can’t perform that action at this time.
0 commit comments