Приложение

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
@@ -0,0 +1,26 @@
package stories.data.repository
import stories.data.remote.api.*
import stories.domain.repository.StoryRepository
import okhttp3.MultipartBody
import javax.inject.Inject
class StoryRepositoryImpl @Inject constructor(
private val api: StoryApi
) : StoryRepository {
override suspend fun getStories(): List<StoryGroupDto> = api.getStories()
override suspend fun createStory(request: CreateStoryRequest): StoryResponse =
api.createStory(request)
override suspend fun uploadVideo(file: MultipartBody.Part): UploadResponse =
api.uploadVideo(file)
override suspend fun viewStory(storyId: String) = api.viewStory(storyId)
override suspend fun addReaction(storyId: String, emoji: String) =
api.addReaction(storyId, ReactionRequest(emoji))
override suspend fun addReply(storyId: String, content: String) =
api.addReply(storyId, ReplyRequest(content))
}