-
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.
[feat] #113 My Project List & View My Project Server Connection
- Loading branch information
Showing
14 changed files
with
656 additions
and
465 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
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/example/infraandroid/myinfo/myideamanage/model/MyProjectService.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,16 @@ | ||
package com.example.infraandroid.myinfo.myideamanage.model | ||
|
||
import com.example.infraandroid.category.model.ResponseLookUpAllProjectData | ||
import retrofit2.Call | ||
import retrofit2.http.GET | ||
import retrofit2.http.Header | ||
import retrofit2.http.Query | ||
|
||
interface MyProjectService { | ||
@GET("/project/myProject?") | ||
fun viewMyProject( | ||
@Header("X-ACCESS-TOKEN") jwt: String, | ||
@Header("X-REFRESH-TOKEN") refreshToken: Int, | ||
@Query("user_id") userId : String | ||
): Call<ResponseMyProjectListData> | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/example/infraandroid/myinfo/myideamanage/model/MyProjectViewModel.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,14 @@ | ||
package com.example.infraandroid.myinfo.myideamanage.model | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import androidx.lifecycle.ViewModel | ||
|
||
class MyProjectViewModel : ViewModel() { | ||
private val _currentObservingProjectNum = MutableLiveData<Int>() | ||
val currentObservingProjectNum: LiveData<Int> = _currentObservingProjectNum | ||
|
||
fun updateObservingProjectNum(projectNum: Int){ | ||
_currentObservingProjectNum.value = projectNum | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...main/java/com/example/infraandroid/myinfo/myideamanage/model/ResponseMyProjectListData.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,23 @@ | ||
package com.example.infraandroid.myinfo.myideamanage.model | ||
|
||
data class ResponseMyProjectListData( | ||
val code: Int, | ||
val isSuccess: Boolean, | ||
val message: String, | ||
val result: ArrayList<Result> | ||
) { | ||
data class Result( | ||
val hashtag: ArrayList<String>, | ||
val pj_categoryName: String, | ||
val pj_daysub: Int, | ||
val pj_deadline: String, | ||
val pj_header: String, | ||
val pj_num: Int, | ||
val pj_photo: ArrayList<String>, | ||
val pj_progress: String, | ||
val pj_recruit: String, | ||
val pj_recruitPerson: Int, | ||
val pj_subCategoryNum: Int, | ||
val pj_totalPerson: Int | ||
) | ||
} |
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
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
Oops, something went wrong.