-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Team-01][Android] Todo 화면 및 레포지토리 구현 #151
Open
banjjak2
wants to merge
11
commits into
codesquad-members-2022:team-01
Choose a base branch
from
ku-kim:develop-Android
base: team-01
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c7119d3
[Android] PR 피드백 수정 (#41)
banjjak2 fd11ce4
chore: mockup API 수정 사항 적용
banjjak2 b596a2d
Merge pull request #43 from ku-kim/feature/Android/mockup-update
shncder eb126f0
[Android] Network 관련 코드 분리 및 레포지토리 이름 변경 (#45)
banjjak2 dd55cf2
feat: TO-DO Repository 구현
banjjak2 8ff7958
Merge pull request #46 from ku-kim/feature/Android/todo-repository
shncder 0708b5a
[Android] Todo 화면 및 레포지토리 구현 (#52)
banjjak2 b3ee3c3
chore: 피드백 적용 - 패키지명 언더바 제거
banjjak2 120d3b9
chore: MainActivity 테스트 코드를 뷰모델로 이동
banjjak2 4e18c86
chore: binding을 이용해 뷰를 참조하도록 수정
banjjak2 4860095
test: 테스트 코드 수정
banjjak2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
.../java/com/example/todo_list/Repository.kt → .../com/example/todo_list/data/Repository.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
13 changes: 13 additions & 0 deletions
13
Android/app/src/main/java/com/example/todo_list/data/TasksRepository.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,13 @@ | ||
package com.example.todo_list.data | ||
|
||
import com.example.todo_list.history.data.HistoryCard | ||
import com.example.todo_list.network.NetworkModule | ||
import retrofit2.Response | ||
|
||
class TasksRepository : Repository { | ||
private val network = NetworkModule.service | ||
|
||
override suspend fun getHistories(): Response<List<HistoryCard>> { | ||
return network.getHistories("histories") | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
Android/app/src/main/java/com/example/todo_list/history/HistoryReceive.kt
This file was deleted.
Oops, something went wrong.
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
13 changes: 0 additions & 13 deletions
13
Android/app/src/main/java/com/example/todo_list/history/data/HistoryRepository.kt
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
Android/app/src/main/java/com/example/todo_list/network/NetworkModule.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 com.example.todo_list.network | ||
|
||
import retrofit2.Retrofit | ||
import retrofit2.converter.gson.GsonConverterFactory | ||
|
||
class NetworkModule { | ||
companion object RetrofitApiObject { | ||
private const val BASE_URL = "https://f278a12c-c825-466b-aa01-65337bbdf28a.mock.pstmn.io/" | ||
|
||
private val retrofit = | ||
Retrofit.Builder() | ||
.baseUrl(BASE_URL) | ||
.addConverterFactory(GsonConverterFactory.create()) | ||
.build() | ||
val service: TodoService = retrofit.create(TodoService::class.java) | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Android/app/src/main/java/com/example/todo_list/network/TodoService.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.todo_list.network | ||
|
||
import com.example.todo_list.history.data.HistoryCard | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
import retrofit2.http.Path | ||
|
||
interface TodoService { | ||
|
||
@GET("api/{histories}") | ||
suspend fun getHistories( | ||
@Path("histories") variable: String | ||
): Response<List<HistoryCard>> | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
패키지명이 todo_list 인가요? 특별한 이유가 없다면 소문자로 작성되는것이 컨벤션이라 맞추는게 좋을거 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변경 완료했습니다. 감사합니다!