Skip to content

Commit

Permalink
[feat] #17 발매정보 조회 API 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
t1nm1ksun committed May 22, 2024
1 parent 8f6b653 commit 78fd65d
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 91 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.sopt.kream.data.model.response

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class ResponseReleaseProductDto(
@SerialName("releaseProducts")
val releaseProducts: List<ReleaseProductResponseDto>,
) {
@Serializable
data class ReleaseProductResponseDto(
@SerialName("thumbnailUrl")
val thumbnailUrl: String,
@SerialName("brandTitle")
val brandTitle: String,
@SerialName("title")
val title: String,
@SerialName("isScrap")
val isScrap: Boolean,
@SerialName("isUpdate")
val isUpdate: Boolean,
@SerialName("isNew")
val isNew: Boolean,
)
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
package org.sopt.kream.data.service

import org.sopt.kream.data.model.request.RequestDummyDto
import org.sopt.kream.data.model.response.ResponseReleaseProductDto
import org.sopt.kream.data.model.response.ResponseSearchProductDto
import org.sopt.kream.util.base.BaseResponse
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Query

interface ProductService {
@GET("product")
suspend fun getSearchProduct(
@Query("findName") findName: String,
): BaseResponse<ResponseSearchProductDto>

@GET("product/release")
suspend fun getReleaseProduct(
@Header("memberId") userid: Int
): BaseResponse<ResponseReleaseProductDto>
}
Loading

0 comments on commit 78fd65d

Please sign in to comment.