-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: 사용하지 않는 파일 제거 * refactor: 가시성 변경 * feat: api service 구현 * feat: datasource 구현 * refactor: repository 네이밍 수정 (offeringsRepository -> offeringRepository) * feat: 사진 업로드 관련 리소스 파일 추가 * feat: repository 및 model 구현 * feat: 이미지 링크를 통한 크롤링 이미지 불러오는 api 연결 및 이미지 삭제 로직 구현 * style: ktlint 적용 * refactor: 이미지 prefix 추가 및 에러 메시지 수정 * refactor: build 오류 수정 * fix: git conflict 해결
- Loading branch information
Showing
22 changed files
with
235 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
android/app/src/main/java/com/zzang/chongdae/data/mapper/ProductUrlMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.zzang.chongdae.data.mapper | ||
|
||
import com.zzang.chongdae.data.remote.dto.request.ProductUrlRequest | ||
import com.zzang.chongdae.data.remote.dto.response.ProductUrlResponse | ||
import com.zzang.chongdae.domain.model.ProductUrl | ||
|
||
fun ProductUrlResponse.toDomain(): ProductUrl { | ||
return ProductUrl( | ||
imageUrl = this.imageUrl, | ||
) | ||
} | ||
|
||
fun String.toProductUrlRequest(): ProductUrlRequest { | ||
return ProductUrlRequest( | ||
productUrl = this, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
android/app/src/main/java/com/zzang/chongdae/data/remote/dto/request/ProductUrlRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.zzang.chongdae.data.remote.dto.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ProductUrlRequest( | ||
@SerialName("productUrl") val productUrl: String, | ||
) |
10 changes: 10 additions & 0 deletions
10
android/app/src/main/java/com/zzang/chongdae/data/remote/dto/response/ProductUrlResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.zzang.chongdae.data.remote.dto.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ProductUrlResponse( | ||
@SerialName("imageUrl") | ||
val imageUrl: String, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
android/app/src/main/java/com/zzang/chongdae/domain/model/ProductUrl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.zzang.chongdae.domain.model | ||
|
||
data class ProductUrl( | ||
val imageUrl: String, | ||
) |
5 changes: 4 additions & 1 deletion
5
.../domain/repository/OfferingsRepository.kt → ...e/domain/repository/OfferingRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package com.zzang.chongdae.domain.repository | ||
|
||
import com.zzang.chongdae.domain.model.Offering | ||
import com.zzang.chongdae.domain.model.ProductUrl | ||
import com.zzang.chongdae.presentation.view.write.OfferingWriteUiModel | ||
|
||
interface OfferingsRepository { | ||
interface OfferingRepository { | ||
suspend fun fetchOfferings( | ||
lastOfferingId: Long, | ||
pageSize: Int, | ||
): List<Offering> | ||
|
||
suspend fun saveOffering(uiModel: OfferingWriteUiModel): Result<Unit> | ||
|
||
suspend fun saveProductImageOg(productUrl: String): Result<ProductUrl> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
android/app/src/main/java/com/zzang/chongdae/presentation/view/write/OfferingWriteUiState.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.