-
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.
Merge pull request #60 from ttoklip/feat/#15_첫화면로그인_구현
Feat/#15 첫화면로그인 구현
- Loading branch information
Showing
49 changed files
with
2,780 additions
and
1,983 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
package com.umc.ttoklip.data.api | ||
|
||
import com.umc.ttoklip.data.model.ResponseBody | ||
import com.umc.ttoklip.data.model.honeytip.CreateHoneyTipResponse | ||
import com.umc.ttoklip.data.model.mypage.MyPageInfoResponse | ||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
import retrofit2.http.Multipart | ||
import retrofit2.http.PATCH | ||
import retrofit2.http.POST | ||
import retrofit2.http.Part | ||
import retrofit2.http.PartMap | ||
|
||
interface MyPage2Api { | ||
@GET("/api/v1/my-page") | ||
suspend fun getMyPageInfo(): Response<ResponseBody<MyPageInfoResponse>> | ||
|
||
@Multipart | ||
@PATCH("/api/v1/my-page/edit") | ||
suspend fun editMyPageInfo( | ||
@Part profileImage: MultipartBody.Part?, | ||
@Part categories:List<MultipartBody.Part>, | ||
@PartMap params:MutableMap<String,RequestBody> | ||
): Response<ResponseBody<CreateHoneyTipResponse>> | ||
package com.umc.ttoklip.data.api | ||
|
||
import com.umc.ttoklip.data.model.ResponseBody | ||
import com.umc.ttoklip.data.model.honeytip.CreateHoneyTipResponse | ||
import com.umc.ttoklip.data.model.mypage.MyPageInfoResponse | ||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
import retrofit2.http.Multipart | ||
import retrofit2.http.PATCH | ||
import retrofit2.http.POST | ||
import retrofit2.http.Part | ||
import retrofit2.http.PartMap | ||
|
||
interface MyPage2Api { | ||
@GET("/api/v1/my-page") | ||
suspend fun getMyPageInfo(): Response<ResponseBody<MyPageInfoResponse>> | ||
|
||
@Multipart | ||
@PATCH("/api/v1/my-page/edit") | ||
suspend fun editMyPageInfo( | ||
@Part profileImage: MultipartBody.Part?, | ||
@Part categories:List<MultipartBody.Part>, | ||
@PartMap params:MutableMap<String,RequestBody> | ||
): Response<ResponseBody<CreateHoneyTipResponse>> | ||
} |
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,13 @@ | ||
package com.umc.ttoklip.data.api | ||
|
||
import com.umc.ttoklip.data.model.ResponseBody | ||
import com.umc.ttoklip.data.model.stranger.StrangerResponse | ||
import retrofit2.Response | ||
import retrofit2.http.POST | ||
import retrofit2.http.Query | ||
|
||
interface StrangerApi { | ||
@POST("/api/v1/stranger") | ||
suspend fun getStranger(@Query("nickname") nick: String) | ||
: Response<ResponseBody<StrangerResponse>> | ||
} |
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,14 @@ | ||
package com.umc.ttoklip.data.api | ||
|
||
import com.umc.ttoklip.data.model.ResponseBody | ||
import com.umc.ttoklip.data.model.signup.TermResponse | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
import retrofit2.http.Query | ||
|
||
interface TermApi { | ||
@GET("/api/v1/term") | ||
suspend fun getTerm( | ||
@Query("page") page: Int) | ||
: Response<ResponseBody<TermResponse>> | ||
} |
24 changes: 12 additions & 12 deletions
24
app/src/main/java/com/umc/ttoklip/data/model/honeytip/HoneyTipPagingResponse.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,12 +1,12 @@ | ||
package com.umc.ttoklip.data.model.honeytip | ||
|
||
data class HoneyTipPagingResponse( | ||
val data: List<HoneyTipMain>, | ||
val category: String, | ||
val totalPage: Int, | ||
val totalElements: Int, | ||
val isFirst: Boolean, | ||
val isLast: Boolean, | ||
) { | ||
constructor(): this(listOf(), "", 0, 0, true, false) | ||
} | ||
package com.umc.ttoklip.data.model.honeytip | ||
|
||
data class HoneyTipPagingResponse( | ||
val data: List<HoneyTipMain>, | ||
val category: String, | ||
val totalPage: Int, | ||
val totalElements: Int, | ||
val isFirst: Boolean, | ||
val isLast: Boolean, | ||
) { | ||
constructor(): this(listOf(), "", 0, 0, true, false) | ||
} |
12 changes: 6 additions & 6 deletions
12
app/src/main/java/com/umc/ttoklip/data/model/honeytip/request/HoneyTipCommentRequest.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,6 +1,6 @@ | ||
package com.umc.ttoklip.data.model.honeytip.request | ||
|
||
data class HoneyTipCommentRequest( | ||
val comment: String, | ||
val parentCommentId: Int | ||
) | ||
package com.umc.ttoklip.data.model.honeytip.request | ||
|
||
data class HoneyTipCommentRequest( | ||
val comment: String, | ||
val parentCommentId: Int | ||
) |
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/umc/ttoklip/data/model/stranger/StrangerResponse.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,13 @@ | ||
package com.umc.ttoklip.data.model.stranger | ||
|
||
data class StrangerResponse ( | ||
val nickname:String, | ||
val residence:String, | ||
val level:Int, | ||
val experience:ExperienceResponse | ||
) | ||
data class ExperienceResponse( | ||
val current:Int, | ||
val required:Int, | ||
val levelimageurl:String | ||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/umc/ttoklip/data/repository/location/DirectLocationRepository.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,8 @@ | ||
package com.umc.ttoklip.data.repository.location | ||
|
||
import com.umc.ttoklip.data.model.KakaoResponse | ||
import retrofit2.Call | ||
|
||
interface DirectLocationRepository { | ||
suspend fun getDirectAddress(address:String): Call<KakaoResponse.ResultSearchKeyword> | ||
} |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/umc/ttoklip/data/repository/location/DirectLocationRepositoryImpl.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.umc.ttoklip.data.repository.location | ||
|
||
import com.umc.ttoklip.R | ||
import com.umc.ttoklip.data.api.KakaoApi | ||
import com.umc.ttoklip.data.model.KakaoResponse | ||
import retrofit2.Call | ||
import javax.inject.Inject | ||
|
||
class DirectLocationRepositoryImpl @Inject constructor( | ||
private val api: KakaoApi | ||
): DirectLocationRepository { | ||
|
||
override suspend fun getDirectAddress(address: String): Call<KakaoResponse.ResultSearchKeyword> { | ||
val call = api.getSearchKeyword(R.string.kakao_api_key.toString(), address) | ||
return call | ||
} | ||
} |
38 changes: 19 additions & 19 deletions
38
app/src/main/java/com/umc/ttoklip/data/repository/search/Search2Repository.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,20 +1,20 @@ | ||
package com.umc.ttoklip.data.repository.search | ||
|
||
import com.umc.ttoklip.data.model.CommonResponse | ||
import com.umc.ttoklip.data.model.news.MainNewsResponse | ||
import com.umc.ttoklip.data.model.news.comment.NewsCommentRequest | ||
import com.umc.ttoklip.data.model.news.detail.NewsDetailResponse | ||
import com.umc.ttoklip.data.model.search.NewsSearchResponse | ||
import com.umc.ttoklip.data.model.search.SearchModel | ||
import com.umc.ttoklip.data.model.search.TipSearchResponse | ||
import com.umc.ttoklip.data.model.search.TownSearchResponse | ||
import com.umc.ttoklip.module.NetworkResult | ||
|
||
interface Search2Repository { | ||
|
||
suspend fun getNewsSearch(title : String, sort: String, page: Int): NetworkResult<NewsSearchResponse> | ||
|
||
suspend fun getTipSearch(title : String, sort: String, page: Int): NetworkResult<TipSearchResponse> | ||
|
||
suspend fun getTownSearch(title : String, sort: String, page: Int): NetworkResult<TownSearchResponse> | ||
package com.umc.ttoklip.data.repository.search | ||
|
||
import com.umc.ttoklip.data.model.CommonResponse | ||
import com.umc.ttoklip.data.model.news.MainNewsResponse | ||
import com.umc.ttoklip.data.model.news.comment.NewsCommentRequest | ||
import com.umc.ttoklip.data.model.news.detail.NewsDetailResponse | ||
import com.umc.ttoklip.data.model.search.NewsSearchResponse | ||
import com.umc.ttoklip.data.model.search.SearchModel | ||
import com.umc.ttoklip.data.model.search.TipSearchResponse | ||
import com.umc.ttoklip.data.model.search.TownSearchResponse | ||
import com.umc.ttoklip.module.NetworkResult | ||
|
||
interface Search2Repository { | ||
|
||
suspend fun getNewsSearch(title : String, sort: String, page: Int): NetworkResult<NewsSearchResponse> | ||
|
||
suspend fun getTipSearch(title : String, sort: String, page: Int): NetworkResult<TipSearchResponse> | ||
|
||
suspend fun getTownSearch(title : String, sort: String, page: Int): NetworkResult<TownSearchResponse> | ||
} |
Oops, something went wrong.