Skip to content

Commit

Permalink
[FEAT] #4-write
Browse files Browse the repository at this point in the history
  • Loading branch information
jinsilWoo committed May 21, 2022
1 parent 8a78c46 commit 157f112
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
11 changes: 0 additions & 11 deletions app/src/main/java/org/sopt/sopkathon5/andorid/data/WriteService.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.sopt.sopkathon5.andorid.data
package org.sopt.sopkathon5.andorid.data.model

data class RequestWrite(
val userId:Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.sopt.sopkathon5.andorid.data
package org.sopt.sopkathon5.andorid.data.model

data class ResponseWrite (
val status: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.sopt.sopkathon5.andorid.data
package org.sopt.sopkathon5.andorid.data.model

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
Expand All @@ -11,4 +11,5 @@ object ServiceCreator {
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build()

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.sopt.sopkathon5.andorid.data.model

import org.sopt.sopkathon5.andorid.data.model.ResponseWrite
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.POST

interface WriteService {
@POST("daily")
fun postWrite(
@Body body: RequestWrite
): Call<ResponseWrite>
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import android.os.Bundle
import android.view.View
import android.widget.Toast
import org.sopt.sopkathon5.andorid.R
import org.sopt.sopkathon5.andorid.data.WriteService
import org.sopt.sopkathon5.andorid.data.model.RequestWrite
import org.sopt.sopkathon5.andorid.data.model.ResponseWrite
import org.sopt.sopkathon5.andorid.data.model.ServiceCreator
import org.sopt.sopkathon5.andorid.data.model.WriteService
import org.sopt.sopkathon5.andorid.databinding.ActivityWriteBinding
import org.sopt.sopkathon5.andorid.util.base.BaseActivity
import retrofit2.Call

class WriteActivity : BaseActivity<ActivityWriteBinding>(R.layout.activity_write) {
private var cnt = 0
Expand Down Expand Up @@ -55,6 +59,11 @@ class WriteActivity : BaseActivity<ActivityWriteBinding>(R.layout.activity_write
}


private fun writeNetWork(){

}




}

0 comments on commit 157f112

Please sign in to comment.