Skip to content
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

[Network] #105 - Univ Select API 연동 #111

Merged
merged 3 commits into from
Jul 18, 2024
Merged

[Network] #105 - Univ Select API 연동 #111

merged 3 commits into from
Jul 18, 2024

Conversation

shimseohyun
Copy link
Contributor

🔥 Pull requests

👷 작업한 내용

  • Univ Select API 연동했습니다.
  • get, post 두개 다 연결함

🚨 참고 사항

University 정보를 User Default 에 저장합니다.

 UserDefaults.standard.getUniversity()?.name ?? "한끼대학교"

대학 이름은 이런식으로 가져오면 됩니다. (다른 것도 동일함)

📸 스크린샷

구현 내용 15 pro
GIF

✅ Check List

  • Merge 대상 브랜치가 올바른가?
  • 최종 코드가 에러 없이 잘 동작하는가?
  • 전체 변경사항이 500줄을 넘지 않는가?

📟 관련 이슈

@shimseohyun shimseohyun added 🤹🏻‍♀️ 서현 서현 공주 작업 🛜 Network API 연결 labels Jul 18, 2024
@shimseohyun shimseohyun self-assigned this Jul 18, 2024
Conflicts:
	Hankkijogbo/Hankkijogbo/Application/SceneDelegate.swift
	Hankkijogbo/Hankkijogbo/Present/CreateZip/ViewModel/CreateZipViewModel.swift
Copy link
Member

@EunsuSeo01 EunsuSeo01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생이 많았소이다.

Comment on lines +29 to +34
private var titleButtonAction: ButtonAction? {
didSet {
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(titleButtonDidTap))
titleStackView.addGestureRecognizer(tapGesture)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p2: titleButtonDidTap이라고 해서 내 titleButton을 찾아 조금 헤매었다오. 나의 아기 벗이여, 혹시 직관적으로 titleStackViewDidTap은 어떠한가?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

음 근데, 토글 버튼도 있어서 button으로 두었소....

Comment on lines +31 to +37
func saveUniversity(_ university: UniversityModel) {
print("대학정보 저장")
let defaults = UserDefaults.standard
if let encoded = try? JSONEncoder().encode(university) {
defaults.set(encoded, forKey: "university")
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

내 기분이 아주 좋소이다. 감사하오.

Comment on lines +69 to +82
func postReissue(completion: @escaping (NetworkResult<PostReissueResponseData>) -> Void) {
provider.request(.postReissue) { result in
switch result {
case .success(let response):
let networkResult: NetworkResult<PostReissueResponseData> = self.fetchNetworkResult(statusCode: response.statusCode, data: response.data)
completion(networkResult)
case .failure(let error):
if let response = error.response {
let networkResult: NetworkResult<PostReissueResponseData> = self.fetchNetworkResult(statusCode: response.statusCode, data: response.data)
completion(networkResult)
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPLE TV

Copy link
Member

@mcrkgus mcrkgus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -27,9 +27,32 @@ extension UserDefaults {
func getAccesshToken() -> String {
return UserDefaults.standard.string(forKey: UserDefaultsKey.accessToken.rawValue) ?? ""
}

func saveUniversity(_ university: UniversityModel) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks girl

@shimseohyun shimseohyun merged commit 98b2468 into develop Jul 18, 2024
@shimseohyun shimseohyun deleted the network/#105 branch July 18, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛜 Network API 연결 🤹🏻‍♀️ 서현 서현 공주 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Network] University API 연동
3 participants