Приложение
This commit is contained in:
27
client-mobile/profiles/data/remote/api/ProfileApi.kt
Normal file
27
client-mobile/profiles/data/remote/api/ProfileApi.kt
Normal file
@@ -0,0 +1,27 @@
|
||||
package profiles.data.remote.api
|
||||
|
||||
import okhttp3.MultipartBody
|
||||
import profiles.data.remote.dto.ProfileDto
|
||||
import profiles.data.remote.dto.UpdateProfileRequest
|
||||
import retrofit2.http.*
|
||||
|
||||
interface ProfileApi {
|
||||
@GET("profiles/{id}")
|
||||
suspend fun getProfile(@Path("id") id: String): ProfileDto
|
||||
|
||||
@GET("profiles/me")
|
||||
suspend fun getMyProfile(): ProfileDto
|
||||
|
||||
@PUT("profiles/profile")
|
||||
suspend fun updateProfile(@Body request: UpdateProfileRequest): ProfileDto
|
||||
|
||||
@Multipart
|
||||
@POST("profiles/avatar")
|
||||
suspend fun uploadAvatar(@Part avatar: MultipartBody.Part): ProfileDto
|
||||
|
||||
@DELETE("profiles/avatar")
|
||||
suspend fun removeAvatar(): ProfileDto
|
||||
|
||||
@GET("profiles/search")
|
||||
suspend fun searchProfiles(@Query("q") query: String): List<ProfileDto>
|
||||
}
|
||||
Reference in New Issue
Block a user