-
Notifications
You must be signed in to change notification settings - Fork 1
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
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
5 changes: 4 additions & 1 deletion
5
app/src/main/java/org/sopt/sopkathon5/andorid/data/ServiceCreator.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,14 +1,17 @@ | ||
package org.sopt.sopkathon5.andorid.data | ||
|
||
import org.sopt.sopkathon5.andorid.data.service.MyPageService | ||
import retrofit2.Retrofit | ||
import retrofit2.converter.gson.GsonConverterFactory | ||
|
||
object ServiceCreator { | ||
private const val BASE_URL = "https://asia-northeast3-we-sopt-29.cloudfunctions.net/api/" | ||
private const val BASE_URL = "54.180.144.204:5001/" | ||
|
||
private val retrofit: Retrofit = Retrofit | ||
.Builder() | ||
.baseUrl(BASE_URL) | ||
.addConverterFactory(GsonConverterFactory.create()) | ||
.build() | ||
|
||
val myPageService = retrofit.create(MyPageService::class.java) | ||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/org/sopt/sopkathon5/andorid/data/model/request/RequestMissionCheck.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 org.sopt.sopkathon5.andorid.data.model.request | ||
|
||
data class RequestMissionCheck( | ||
val _id: String, | ||
val userId: Int, | ||
val dailyId: String, | ||
val completeMissions: List<String> | ||
) |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/org/sopt/sopkathon5/andorid/data/model/response/ResponseStoreDaily.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 org.sopt.sopkathon5.andorid.data.model.response | ||
|
||
data class ResponseStoreDaily( | ||
val status: Int, | ||
val success: Boolean, | ||
val message: String, | ||
val data: List<Data> | ||
) { | ||
data class Data( | ||
val _id: String, | ||
val userId: Int, | ||
val userName: String, | ||
val dailyId: String, | ||
val completeMissions: List<List<String>>, | ||
val __v: Int | ||
) | ||
} |
10 changes: 10 additions & 0 deletions
10
app/src/main/java/org/sopt/sopkathon5/andorid/data/service/MyPageService.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 org.sopt.sopkathon5.andorid.data.service | ||
|
||
import org.sopt.sopkathon5.andorid.data.model.response.ResponseStoreDaily | ||
import retrofit2.Call | ||
import retrofit2.http.GET | ||
|
||
interface MyPageService { | ||
@GET("daily/1") | ||
fun getStoredDaily(): Call<ResponseStoreDaily> | ||
} |