Приложение

This commit is contained in:
Халимов Рустам
2026-04-14 01:15:54 +03:00
parent 8399d32490
commit 1fb1be47dd
126 changed files with 6145 additions and 0 deletions

View 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>
}

View File

@@ -0,0 +1,16 @@
package profiles.data.remote.dto
data class ProfileDto(
val id: String,
val username: String,
val displayName: String?,
val avatarUrl: String?,
val bio: String?,
val isOnline: Boolean = false,
val lastSeen: String? = null
)
data class UpdateProfileRequest(
val displayName: String?,
val bio: String?
)