-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 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
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/owori/android/data/api/family/FamilyApi.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,31 @@ | ||
package com.owori.android.data.api.family | ||
|
||
import com.owori.android.data.model.family.FamilyImageResponse | ||
import com.owori.android.data.model.family.FamilyNameRequest | ||
import com.owori.android.data.model.family.InviteCodeData | ||
import com.owori.android.module.DataResult | ||
import okhttp3.MultipartBody | ||
import retrofit2.http.Body | ||
import retrofit2.http.Multipart | ||
import retrofit2.http.POST | ||
import retrofit2.http.Part | ||
|
||
interface FamilyApi { | ||
|
||
// 가족 생성 | ||
@POST("/families") | ||
fun createFamily(@Body data: FamilyNameRequest) : DataResult<InviteCodeData> | ||
|
||
// 가족 멤버 초대코드로 추가 | ||
@POST("/families/members") | ||
fun inviteMember(@Body data: InviteCodeData) : DataResult<Any> | ||
|
||
// 가족 그룹 이름 수정 | ||
@POST("/families/group-name") | ||
fun deleteComment(@Body data: FamilyNameRequest) : DataResult<Any> | ||
|
||
// 가족 이미지 저장 | ||
@Multipart | ||
@POST("/families/images") | ||
fun editFamilyThumbnail(@Part image: MultipartBody.Part) : DataResult<FamilyImageResponse> | ||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/owori/android/data/model/family/FamilyImageResponse.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.owori.android.data.model.family | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class FamilyImageResponse( | ||
@SerializedName("family_image") | ||
val imageUrl: String, | ||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/owori/android/data/model/family/FamilyNameResponse.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.owori.android.data.model.family | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class FamilyNameRequest( | ||
@SerializedName("familyGroupName") | ||
val familyName: String, | ||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/owori/android/data/model/family/InviteCodeData.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.owori.android.data.model.family | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class InviteCodeData( | ||
@SerializedName("invite_code") | ||
val inviteCode: String, | ||
) |