-
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
10 changed files
with
49 additions
and
21 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
20 changes: 5 additions & 15 deletions
20
app/src/main/java/com/owori/android/data/api/auth/AuthApi.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,22 +1,12 @@ | ||
package com.owori.android.data.api.auth | ||
|
||
import com.owori.android.data.model.SignUpRequest | ||
import com.owori.android.data.model.SignUpResponse | ||
import com.owori.android.data.model.auth.RefreshResponse | ||
import com.owori.android.data.model.member.SignUpRequest | ||
import com.owori.android.module.DataResult | ||
import retrofit2.http.Body | ||
import retrofit2.http.POST | ||
|
||
/* | ||
* Created by JJJoonngg | ||
*/ | ||
import retrofit2.http.GET | ||
|
||
interface AuthApi { | ||
@POST("/members/kakao") | ||
fun kakaoLogin(@Body data: SignUpRequest) : DataResult<SignUpResponse> | ||
|
||
@POST("/members/google") | ||
fun googleLogin(@Body data: SignUpRequest) : DataResult<SignUpResponse> | ||
|
||
@POST("/members/apple") | ||
fun appleLogin(@Body data: SignUpRequest) : DataResult<SignUpResponse> | ||
@GET("/api/v1/auth/refresh") | ||
fun getTokenByRefreshToken(@Body data: SignUpRequest) : DataResult<RefreshResponse> | ||
} |
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/owori/android/data/api/member/MemberApi.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,18 @@ | ||
package com.owori.android.data.api.member | ||
|
||
import com.owori.android.data.model.member.SignUpRequest | ||
import com.owori.android.data.model.member.SignUpResponse | ||
import com.owori.android.module.DataResult | ||
import retrofit2.http.Body | ||
import retrofit2.http.POST | ||
|
||
interface MemberApi { | ||
@POST("/api/v1/members/kakao") | ||
fun kakaoLogin(@Body data: SignUpRequest) : DataResult<SignUpResponse> | ||
|
||
@POST("/api/v1/members/google") | ||
fun googleLogin(@Body data: SignUpRequest) : DataResult<SignUpResponse> | ||
|
||
@POST("/api/v1/members/apple") | ||
fun appleLogin(@Body data: SignUpRequest) : DataResult<SignUpResponse> | ||
} |
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/owori/android/data/model/auth/RefreshResponse.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,10 @@ | ||
package com.owori.android.data.model.auth | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class RefreshResponse( | ||
@SerializedName("access_token") | ||
val accessToken: String, | ||
@SerializedName("refresh_token") | ||
val refreshToken: String | ||
) |
2 changes: 1 addition & 1 deletion
2
.../owori/android/data/model/AuthProvider.kt → ...android/data/model/member/AuthProvider.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
2 changes: 1 addition & 1 deletion
2
...owori/android/data/model/SignUpRequest.kt → ...ndroid/data/model/member/SignUpRequest.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
2 changes: 1 addition & 1 deletion
2
...wori/android/data/model/SignUpResponse.kt → ...droid/data/model/member/SignUpResponse.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
2 changes: 1 addition & 1 deletion
2
...android/data/model/SignUpResponseToken.kt → .../data/model/member/SignUpResponseToken.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
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,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="base_url">http://owori.store/api/v1</string> | ||
<string name="base_url">http://13.124.20.243/api/v1</string> | ||
</resources> |