Skip to content

Commit

Permalink
[feat] detail_image / 사진 정보 가져오기 api 서비스까지 완료 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
2chang5 committed Jul 22, 2022
1 parent ee292a2 commit 0f0856b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.intellij.lang.annotations.PrintFormat
import retrofit2.Retrofit
import retrofit2.create
import javax.inject.Singleton

@Module
Expand Down Expand Up @@ -49,4 +47,8 @@ object RetrofitServiceModule {
fun providesOftenSearchTagService(retrofit: Retrofit): OftenSearchTagService =
retrofit.create(OftenSearchTagService::class.java)

@Provides
@Singleton
fun providesDetailImageService(retrofit: Retrofit): DetailImageService =
retrofit.create(DetailImageService::class.java)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.photosurfer.android.data.remote.model.response

import com.google.gson.annotations.SerializedName
import com.photosurfer.android.domain.entity.TagInfo

data class DetailImageResponse(
@SerializedName("id")
val id: Int,
@SerializedName("imageUrl")
val imageUrl: String,
@SerializedName("push")
val push: Int,
@SerializedName("tags")
val tags: List<TagInfo>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.photosurfer.android.data.remote.service

import com.photosurfer.android.data.remote.calladapter.NetworkState
import com.photosurfer.android.data.remote.model.response.BaseResponse
import com.photosurfer.android.data.remote.model.response.DetailImageResponse
import retrofit2.http.GET
import retrofit2.http.Path

interface DetailImageService {
@GET("photo/detail/{photoId}")
suspend fun getDetailImageInfo(
@Path("photoID") photo: Int
): NetworkState<BaseResponse<DetailImageResponse>>
}

0 comments on commit 0f0856b

Please sign in to comment.