-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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.
리팩토링 아자잣~~~!
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.
선생님,,,! 파이팅이예요
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) | ||
} |
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.
저희가 사용해야 하는 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.
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을 매개변수로 넘겨주지 않아도 됩니다!
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.
안녕하세요. 민재님 리뷰어로 함께하게 된 명예OB 이준원입니다.
아직 과제 완수를 하지 않으신 것 같습니다.
서버 연동을 하지 않은 것 같네요..? 👀 (워낙 양이 많았으니 이해가 갑니다..)
과제를 다 완수하시면 리뷰 요청 부탁드려요! 💪
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) | ||
} |
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.
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을 매개변수로 넘겨주지 않아도 됩니다!
object ServicePool { | ||
val authService = ApiFactory.create<AuthService>() | ||
} |
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.
현재 해당 service 객체를 사용하고 있지 않습니다 👀
@@ -1,4 +1,4 @@ | |||
package com.sopt.now.compose.home | |||
package com.sopt.now.compose.main.home |
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.
main 이라는 package 명을 보면 동료개발자가 해당 패키지에 어떤 class들이 들어있는지 알 수 있을까요??
import retrofit2.http.POST | ||
|
||
interface AuthService { | ||
@POST("member/join") //http 메소드 |
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.
👍
@POST("member/join") //http 메소드 | ||
fun signUp( | ||
@Body request: RequestSignUpDto | ||
): Call<ResponseSignUpDto> //비동기->callback |
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.
다만, 불필요한 주석은 삭제해주세요!
Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
늦었지만,, 빠르게 달려보겠습니다..ㅠ