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

week4: 4차 필수과제 진행(Compose) #11

Merged
merged 2 commits into from
May 24, 2024

Conversation

SYAAINN
Copy link
Collaborator

@SYAAINN SYAAINN commented May 3, 2024

Related issue 🛠

Work Description ✏️

  • 서버 통신 기초 파일 작성
  • 파일 리패키징

Screenshot 📸

Uncompleted Tasks 😅

  • 회원가입 서버 통신
  • 로그인 서버 통신
  • 마이페이지 로그인 정보 노출
  • 홈 화면 OpenAPI 구현

To Reviewers 📢

늦었지만,, 빠르게 달려보겠습니다..ㅠ

@SYAAINN SYAAINN requested review from chattymin and a team May 3, 2024 14:38
@SYAAINN SYAAINN self-assigned this May 3, 2024
Copy link
Member

@arinming arinming left a comment

Choose a reason for hiding this comment

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

리팩토링 아자잣~~~!

Copy link
Member

@junseo511 junseo511 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 +10 to +21
object ApiFactory {
private const val BASE_URL: String = BuildConfig.AUTH_BASE_URL

val retrofit: Retrofit by lazy {
Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
}

inline fun <reified T> create(): T = retrofit.create(T::class.java)
}
Copy link
Member

Choose a reason for hiding this comment

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

저희가 사용해야 하는 api는 두개랍니다 🤭

Copy link

Choose a reason for hiding this comment

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

Suggested change
object ApiFactory {
private const val BASE_URL: String = BuildConfig.AUTH_BASE_URL
val retrofit: Retrofit by lazy {
Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
}
inline fun <reified T> create(): T = retrofit.create(T::class.java)
}
object ApiFactory {
private const val BASE_URL: String = BuildConfig.AUTH_BASE_URL
val retrofit: Retrofit by lazy {
Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
}
inline fun <reified T> create(): T = retrofit.create()
}

class Type을 매개변수로 넘겨주지 않아도 됩니다!

Copy link

@murjune murjune left a comment

Choose a reason for hiding this comment

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

안녕하세요. 민재님 리뷰어로 함께하게 된 명예OB 이준원입니다.

아직 과제 완수를 하지 않으신 것 같습니다.
서버 연동을 하지 않은 것 같네요..? 👀 (워낙 양이 많았으니 이해가 갑니다..)

과제를 다 완수하시면 리뷰 요청 부탁드려요! 💪

Comment on lines +10 to +21
object ApiFactory {
private const val BASE_URL: String = BuildConfig.AUTH_BASE_URL

val retrofit: Retrofit by lazy {
Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
}

inline fun <reified T> create(): T = retrofit.create(T::class.java)
}
Copy link

Choose a reason for hiding this comment

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

Suggested change
object ApiFactory {
private const val BASE_URL: String = BuildConfig.AUTH_BASE_URL
val retrofit: Retrofit by lazy {
Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
}
inline fun <reified T> create(): T = retrofit.create(T::class.java)
}
object ApiFactory {
private const val BASE_URL: String = BuildConfig.AUTH_BASE_URL
val retrofit: Retrofit by lazy {
Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
}
inline fun <reified T> create(): T = retrofit.create()
}

class Type을 매개변수로 넘겨주지 않아도 됩니다!

Comment on lines +23 to +25
object ServicePool {
val authService = ApiFactory.create<AuthService>()
}
Copy link

Choose a reason for hiding this comment

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

현재 해당 service 객체를 사용하고 있지 않습니다 👀

@@ -1,4 +1,4 @@
package com.sopt.now.compose.home
package com.sopt.now.compose.main.home
Copy link

Choose a reason for hiding this comment

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

main 이라는 package 명을 보면 동료개발자가 해당 패키지에 어떤 class들이 들어있는지 알 수 있을까요??

import retrofit2.http.POST

interface AuthService {
@POST("member/join") //http 메소드
Copy link

Choose a reason for hiding this comment

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

👍

@POST("member/join") //http 메소드
fun signUp(
@Body request: RequestSignUpDto
): Call<ResponseSignUpDto> //비동기->callback
Copy link

Choose a reason for hiding this comment

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

다만, 불필요한 주석은 삭제해주세요!

@SYAAINN SYAAINN merged commit 17176ae into develope-compose May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants