-
Notifications
You must be signed in to change notification settings - Fork 5
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
Moya 및 Combine을 사용한 Network 리펙토링 #163
Open
minsangKang
wants to merge
46
commits into
master
Choose a base branch
from
feature/network_tony
base: master
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 all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
2675fd8
feat #144: FirebaseAPI 생성
minsangKang 6072374
feat #144: AuthAPI 생성
minsangKang 234bec5
feat #144: DailysAPI 생성
minsangKang 0d80edf
update #144: AuthAPI: task 수정
minsangKang f554462
feat #144: getAppVersion RxMoya 방식 구현
minsangKang 8c90a07
feat #144: getServerURL RxMoya 방식 구현
minsangKang 1bdfc68
feat #144: postSignup RxMoya 방식 구현
minsangKang c6aa580
feat #144: CombineMoya 방식으로 수정 & AuthRepository 구현
minsangKang f80e638
feat #144: 200대 statusCode가 아닌 경우 ErrorResponse 값 반환 구현
minsangKang 3435112
rename #144: Info -> Request 명칭 수정
minsangKang 51f480a
feat #144: DailysRepository 구현
minsangKang 4dfe1af
feat #144: RecordTimesRepository 구현
minsangKang 516c02d
feat #144: SyncLogRepository 구현
minsangKang 115b640
feat #144: NotificationRepository 구현
minsangKang 82539ac
feat #144: NetworkController 내 func들 FirebaseAPI 내 반영
minsangKang dccb6d2
refact #144: DTO 폴더 삭제, Response 및 info로 분리
minsangKang c8bb161
chore #144: 디렉토리 리펙토링
minsangKang 138d552
chore #144: 기존 UseCase들 lagacy 폴더로 이동
minsangKang 1a7e0db
feat #144: NetworkController 내 함수들 FirebaseRepository 내 반영
minsangKang 60b8304
feat #144: FirebaseUseCase 생성
minsangKang c367b9c
feat #144: Firebase 관련 UseCase 생성
minsangKang e83bd72
feat #144: GetAppVersionUseCase 반영
minsangKang ec27002
delete #144: 불필요파일 제거
minsangKang a1531f5
feat #144: GetServerURLUseCase 반영
minsangKang b77f417
delete #144: 불필요파일 제거
minsangKang 5437678
Merge branch 'master' into feature/network_tony
minsangKang ebb5afa
feat #144: GetTiTiFunctionsUseCase 반영
minsangKang 9c517cb
fix #144: TTProvider의 request를 사용하도록 수정, map operator 생성
minsangKang 89c5ef3
feat #144: GetUpdateHistorysUseCase 반영
minsangKang fd8ef4d
feat #144: GetSurveysUseCase 반영
minsangKang e550310
feat #144: AuthRepository 관련 UseCase들 생성
minsangKang 9238ebc
feat #144: SignupUseCase, SigninUseCase 반영
minsangKang 0a65a67
feat #144: CheckUsernameExitUseCase 반영
minsangKang d4e899f
feat #144: GetDailysUseCase 셍성 & 반영
minsangKang 2c2ca7a
feat #144: 나머지 UseCase들 생성
minsangKang 3091d08
fix #144: statusCode에 따른 NetworkError가 그대로 전달되도록 수정
minsangKang 9e8cd74
feat #144: UploadDailys 동작 구현, header 를 통해 gmt 전달 구현
minsangKang 4d76aa8
feat #144: GetNotificationUseCase 반영
minsangKang c98a398
feat #144: CheckEmailExitUseCase, UpdatePasswordUseCase 반영
minsangKang c0d0892
feat #144: Post & GetRecordTimeUseCase, GetSyncLogUseCase 반영
minsangKang 7a357a2
feat #144: Network 클래스 제거, 리펙토링 완료
minsangKang 072325a
Merge branch 'master' into feature/network_tony
minsangKang 10b99ef
feat #144: 코드리뷰-버전정보 수신오류시 팝업 표시
minsangKang bc51802
feat #144: 코드리뷰-extension TargetType static 제거
minsangKang aa72f11
feat #144: 코드리뷰-uppercase 변수명 lowercase 수정
minsangKang b78ecae
강제로 error 발생시킨 코드 제거
minsangKang 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
Large diffs are not rendered by default.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// API.swift | ||
// Project_Timer | ||
// | ||
// Created by Kang Minsang on 2024/04/17. | ||
// Copyright © 2024 FDEE. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Moya | ||
|
||
extension TargetType { | ||
func parameters(from encodable: Encodable) -> [String: Any] { | ||
let encoder = JSONEncoder() | ||
guard let data = try? encoder.encode(encodable), | ||
let dictionary = try? JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [String: Any] else { | ||
return [:] | ||
} | ||
|
||
return dictionary | ||
} | ||
} | ||
|
||
extension JSONEncoder { | ||
static var dateFormatted: JSONEncoder { | ||
let encoder = JSONEncoder() | ||
encoder.dateEncodingStrategy = .iso8601 | ||
return encoder | ||
} | ||
} |
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
Oops, something went wrong.
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.
(의견)
AuthAPI로 첫 path명과 동일하게 API 라우터 만들어 주신건 너무 좋은것 같습니다!
개인적인 추가 의견으로 API case와 path를 통일하면 좋겠다는 의견입니다,
API가 많아지다 보면 호출하는곳(사용하는곳)이 아닌 해당 파일의 path까지 와서 확인해야만 어떤 api인지 알 수 있어 이슈 디버깅하는 속도가 느려질것 같아요
회의때 의견 나누면 좋을것 같아서 코멘트 남깁니당
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.
24.10.28 (iOS 회의 결과)