Skip to content

SAMSUNG-ZZANG/Galaxy-Z-Flip-Chaeyeong

Repository files navigation

Galaxy-Z-Flip-Chaeyeong

week1

  • 필수과제
  1. 로그인 페이지 만들기
 (SignInActivity)
  2. 회원가입 페이지 만들기
 (SignUpActivity)
  3. 자기소개 페이지 만들기 (HomeActivity)

https://user-images.githubusercontent.com/62435316/162625295-9a5e0341-dfff-46e4-9bf8-1fedb1758a52.gif

week2

  • 필수과제
  1. HomeActivity 하단에 FollowerRecyclerView, RepositoryRecyclerView 만들기

#2주차GIF

week3

week4

  • 로그인, 회원가입 서버 통신 구현
  1. POSTMAN테스트
  • signIn Test

스크린샷 2022-05-13 오후 11 14 07

  • signUp Test

스크린샷 2022-05-13 오후 11 14 22

  1. 회원가입완료 + 로그인완료구현 week4

  2. retrofit interface와 구현체코드

  • retrofit Interface
interface SoptService {
    @POST("/auth/signin")
    fun postLogin(
        @Body body: RequestSignIn
    ): Call<ResponseSignIn>

    @POST("/auth/signup")
    fun postSignUp(
        @Body body: RequestSignUp
    ): Call<ResponseSignUp>
}
  • 구현체
object ServiceCreator {
    private const val BASE_URL = "http://13.124.62.236"

    private val retrofit: Retrofit = Retrofit.Builder()
        .baseUrl(BASE_URL)
        .addConverterFactory(GsonConverterFactory.create())
        .build()

    val soptService: SoptService = retrofit.create(SoptService::class.java)
}
  1. Request/Response객체에 대한 코드
  • RequestSignUp
data class RequestSignUp(
    @SerializedName("name")
    val name: String,
    val email: String,
    val password: String
)
  • ResponseSignUp
data class ResponseSignUp(
    val status: Int,
    val message: String,
    val data: Data
) {
    data class Data(
        val id: String
    )
}

About

전 삼성 애플 다 좋아합니다

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages