Skip to content

Commit

Permalink
Merge pull request #80 from ttoklip/develop
Browse files Browse the repository at this point in the history
메인업데이트
  • Loading branch information
hangunhee39 authored Jul 1, 2024
2 parents 55ffba5 + 5febf23 commit d54f65c
Show file tree
Hide file tree
Showing 189 changed files with 4,695 additions and 2,918 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build
captures
.externalNativeBuild
.cxx
google-services.json
local.properties
.idea
constant.xml
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
![in1.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in1.png)

![in2.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in2.png)

![in3.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in3.png)

![in4.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in4.png)


## 아키텍쳐
<img width="755" alt="hangunhee39_ttoklip_architecure" src="https://github.com/ttoklip/Android/assets/77563098/c3640f5d-ea24-46bd-807b-023127e81ea0">


## 맴버
| [한건희](https://github.com/hangunhee39) | [김규진](https://github.com/kyujin0911) | [박승연](https://github.com/40food) | [심영수](https://github.com/posite) |
|:------------------------------------------------------------------:|:------------------------------------------------------------------:|:------------------------------------------------------------------:|:---------------------------------------------------------------:|
| 24.01. ~ | 24.01. ~ | 24.01. ~ | 24.01. ~ 24.02. |
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'kotlin-kapt'
id 'com.google.dagger.hilt.android'
id 'dagger.hilt.android.plugin'
id 'com.google.gms.google-services'
}

Properties properties = new Properties()
Expand Down Expand Up @@ -119,6 +120,9 @@ dependencies {
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.6'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.6'

implementation platform('com.google.firebase:firebase-bom:32.7.2')
implementation 'com.google.firebase:firebase-messaging-ktx'

//flexBox(flexLayout)
implementation 'com.google.android.flexbox:flexbox:3.0.0'

Expand Down
38 changes: 31 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.POST_NOTIFICATIONS"
android:minSdkVersion="33" />

<application
android:name=".TtoklipApplication"
Expand All @@ -23,6 +26,7 @@
android:theme="@style/Theme.Ttoklip"
android:usesCleartextTraffic="true"
tools:targetApi="31"
android:enableOnBackInvokedCallback="true"
android:requestLegacyExternalStorage="true">

<meta-data
Expand Down Expand Up @@ -103,35 +107,46 @@
android:name=".presentation.signup.SignupActivity"
android:exported="false" />
<activity
android:name=".presentation.hometown.TogetherActivity"
android:name=".presentation.hometown.together.TogetherActivity"
android:screenOrientation="portrait"
android:exported="false" />
<activity
android:name=".presentation.hometown.CommunicationActivity"
android:name=".presentation.hometown.communication.CommunicationActivity"
android:screenOrientation="portrait"
android:exported="false" />
<activity
android:name=".presentation.hometown.WriteTogetherActivity"
android:name=".presentation.hometown.together.write.WriteTogetherActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:exported="false" />
<activity
android:name=".presentation.hometown.WriteCommunicationActivity"
android:name=".presentation.hometown.communication.write.WriteCommunicationActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:exported="false" />
<activity
android:name=".presentation.hometown.ReadCommunicationActivity"
android:name=".presentation.hometown.communication.read.ReadCommunicationActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:exported="false" />
android:exported="true" />
<activity
android:name=".presentation.hometown.TradeLocationActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:exported="false" />

<activity
android:name=".presentation.otheruser.OtherUserActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:exported="false" />
<activity
android:name=".presentation.otheruser.OtherTipActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:exported="false" />
<activity
android:name=".presentation.hometown.ReadTogetherActivity"
android:name=".presentation.hometown.together.read.ReadTogetherActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:exported="false" />
Expand Down Expand Up @@ -221,6 +236,15 @@

<activity android:name=".presentation.honeytip.read.ReadQuestionActivity" />

<service
android:name=".util.TtoklipFirebaseMessagingService"
android:enabled="true"
android:exported="true"
android:stopWithTask="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>

</manifest>
15 changes: 15 additions & 0 deletions app/src/main/java/com/umc/ttoklip/data/api/FCMApi.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.umc.ttoklip.data.api

import com.umc.ttoklip.data.model.CommonResponse
import com.umc.ttoklip.data.model.ResponseBody
import com.umc.ttoklip.data.model.fcm.FCMTokenRequest
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.PATCH

interface FCMApi {
@PATCH("/api/v1/notification/fcm_token")
suspend fun patchFCMToken(
@Body request : FCMTokenRequest
): Response<ResponseBody<CommonResponse>>
}
7 changes: 7 additions & 0 deletions app/src/main/java/com/umc/ttoklip/data/api/HomeApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ package com.umc.ttoklip.data.api

import com.umc.ttoklip.data.model.ResponseBody
import com.umc.ttoklip.data.model.home.HomeResponse
import com.umc.ttoklip.data.model.home.NotificationResponse
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Query

interface HomeApi {

@GET("/api/v1/home")
suspend fun getHomeMainApi(): Response<ResponseBody<HomeResponse>>

@GET("/api/v1/notification/my-notification")
suspend fun getNotifications(
@Query("notificationCategory") category: String
): Response<ResponseBody<NotificationResponse>>

}
6 changes: 3 additions & 3 deletions app/src/main/java/com/umc/ttoklip/data/api/HoneyTipApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface HoneyTipApi {
@Part("title") title: RequestBody,
@Part("content") content: RequestBody,
@Part("category") category: RequestBody,
@Part images: Array<MultipartBody.Part>,
@Part images: List<MultipartBody.Part?>,
@Part("url") url: RequestBody
): Response<ResponseBody<CreateHoneyTipResponse>>

Expand Down Expand Up @@ -68,7 +68,7 @@ interface HoneyTipApi {
@Part("title") title: RequestBody,
@Part("content") content: RequestBody,
@Part("category") category: RequestBody,
@Part images: Array<MultipartBody.Part>,
@Part images: List<MultipartBody.Part?>,
@Part("url") url: RequestBody
): Response<ResponseBody<CreateHoneyTipResponse>>

Expand Down Expand Up @@ -96,7 +96,7 @@ interface HoneyTipApi {
@Part("title") title: RequestBody,
@Part("content") content: RequestBody,
@Part("category") category: RequestBody,
@Part images: Array<MultipartBody.Part>
@Part images: List<MultipartBody.Part?>
): Response<ResponseBody<CreateHoneyTipResponse>>

@GET("/api/v1/question/post/{postId}")
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/com/umc/ttoklip/data/api/KakaoApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ package com.umc.ttoklip.data.api

import com.umc.ttoklip.R
import com.umc.ttoklip.data.model.KakaoResponse
import com.umc.ttoklip.data.model.ResponseBody
import com.umc.ttoklip.data.model.login.LoginResponse
import retrofit2.Call
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Query
Expand All @@ -12,5 +15,5 @@ interface KakaoApi {
fun getSearchKeyword(
@Header("Authorization") key: String,
@Query("query") query:String
): Call<KakaoResponse.ResultSearchKeyword>
): Response<ResponseBody<KakaoResponse.ResultSearchKeyword>>
}
11 changes: 0 additions & 11 deletions app/src/main/java/com/umc/ttoklip/data/api/MyAccountRestrictApi.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@ package com.umc.ttoklip.data.api

import com.umc.ttoklip.data.model.ResponseBody
import com.umc.ttoklip.data.model.mypage.MyBlockUserResponse
import com.umc.ttoklip.data.model.mypage.NoticeResponse
import com.umc.ttoklip.data.model.mypage.RestrictedResponse
import retrofit2.Response
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.Path

interface MyBlockUserApi {
interface MyPage3Api {
@GET("/api/v1/my-page/restricted")
suspend fun getRestrictedReason(): Response<ResponseBody<RestrictedResponse>>

@GET("/api/v1/my-page/blocked")
suspend fun getMyBlockedUser(): Response<ResponseBody<MyBlockUserResponse>>

@DELETE("/api/v1/my-page/unblock/{targetId}")
suspend fun deleteBlockUser(@Path("targetId") userId: Long): Response<ResponseBody<Unit>>

@GET("api/v1/notice")
suspend fun getNotices(): Response<ResponseBody<NoticeResponse>>
}
8 changes: 8 additions & 0 deletions app/src/main/java/com/umc/ttoklip/data/api/MyPostApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.umc.ttoklip.data.model.mypage.MyQuestionResponse
import com.umc.ttoklip.data.model.mypage.MyTogetherResponse
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

interface MyPostApi {
Expand All @@ -16,6 +17,13 @@ interface MyPostApi {
@GET("/api/v1/my-page/participate-deals")
suspend fun getMyTogethers(@Query("page") page: Int): Response<ResponseBody<MyTogetherResponse>>

@GET("/api/v1/stranger/participate-deals/{userId}")
suspend fun getStrangerDeals(
@Query("page") page: Int,
@Path("userId") userId: Int
): Response<ResponseBody<MyTogetherResponse>>


@GET("/api/v1/my-page/honeytip")
suspend fun getMyHoneyTips(@Query("page") page: Int): Response<ResponseBody<MyHoneyTipsResponse>>

Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/umc/ttoklip/data/api/NaverApi.kt
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.naver.GeocodingResponse
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Query

interface NaverApi {
@GET("map-geocode/v2/geocode")
suspend fun fetchGeocoding(
@Query("query") query: String
): Response<GeocodingResponse>
}
24 changes: 24 additions & 0 deletions app/src/main/java/com/umc/ttoklip/data/api/OtherApi.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.umc.ttoklip.data.api

import com.umc.ttoklip.data.model.ResponseBody
import com.umc.ttoklip.data.model.mypage.MyHoneyTipsResponse
import com.umc.ttoklip.data.model.stranger.OtherUserInfoResponse
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

interface OtherApi {

@GET("/api/v1/stranger")
suspend fun getStrangeInfo(
@Query("nickname") nickname : String,
): Response<ResponseBody<OtherUserInfoResponse>>

@GET("/api/v1/stranger/honeytip/{userId}")
suspend fun getStrangerTip(
@Path("userId") userId : Int,
@Query("page") page : Int,
): Response<ResponseBody<MyHoneyTipsResponse>>

}
11 changes: 6 additions & 5 deletions app/src/main/java/com/umc/ttoklip/data/api/ReadCommsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.umc.ttoklip.data.api

import com.umc.ttoklip.data.model.ResponseBody
import com.umc.ttoklip.data.model.StandardResponse
import com.umc.ttoklip.data.model.town.CommentResponse
import com.umc.ttoklip.data.model.town.CreateCommentRequest
import com.umc.ttoklip.data.model.town.DeleteCommunicationResponse
import com.umc.ttoklip.data.model.town.ReportRequest
Expand Down Expand Up @@ -31,13 +32,13 @@ interface ReadCommsApi {
suspend fun createCommunicationComment(
@Body body: CreateCommentRequest,
@Path("postId") postId: Long
): Response<ResponseBody<Unit>>
): Response<ResponseBody<CommentResponse>>

//소통해요 댓글 삭제
@DELETE("/api/v1/town/comms/comment/{commentId}")
suspend fun deleteCommunicationComment(
@Path("commentId") commentId: Long
): Response<ResponseBody<Unit>>
): Response<ResponseBody<CommentResponse>>

//소통해요 스크랩 추가
@POST("/api/v1/town/comms/scrap/{postId}")
Expand Down Expand Up @@ -73,9 +74,9 @@ interface ReadCommsApi {
): Response<ResponseBody<StandardResponse>>

//소통해요 댓글 신고
@POST("/api/v1/town/comms/comment/report/{postId}")
@POST("/api/v1/town/comms/comment/report/{commentId}")
suspend fun reportCommunicationComment(
@Body body: ReportRequest,
@Body body: com.umc.ttoklip.data.model.honeytip.request.ReportRequest,
@Path("commentId") commentId: Long
): Response<ResponseBody<Unit>>
): Response<ResponseBody<CommentResponse>>
}
Loading

0 comments on commit d54f65c

Please sign in to comment.