LikeApiService

interface LikeApiService

Interface for the LikeApiService. It contains the methods for managing Like data in the API.

Functions

Link copied to clipboard
@DELETE(value = "likes/{id}")
abstract suspend fun deleteLike(@Path(value = "id") id: String): ApiLike

Deletes a Like item from the API.

Link copied to clipboard

Extension function to convert the deleteLike function to a Flow.

Link copied to clipboard
@GET(value = "likes")
abstract suspend fun getLikes(): List<ApiLike>

Fetches all Like items from the API.

Link copied to clipboard

Extension function to convert the getLikes function to a Flow.

Link copied to clipboard
@POST(value = "likes")
abstract suspend fun postLike(@Body like: ApiLike): ApiLike

Posts a new Like item to the API.

Link copied to clipboard

Extension function to convert the postLike function to a Flow.

Link copied to clipboard
@PUT(value = "likes/{id}")
abstract suspend fun putLike(@Path(value = "id") id: String, @Body like: ApiLike): ApiLike

Updates a Like item in the API.

Link copied to clipboard

Extension function to convert the putLike function to a Flow.