|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.example.what_the_fantasy.data.retrofit
|
|
|
|
package com.example.what_the_fantasy.data.retrofit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.example.what_the_fantasy.data.model.Quote
|
|
|
|
import com.example.what_the_fantasy.data.model.SrcLanguage
|
|
|
|
import com.example.what_the_fantasy.data.model.SrcLanguage
|
|
|
|
import com.example.what_the_fantasy.data.model.User
|
|
|
|
import com.example.what_the_fantasy.data.model.User
|
|
|
|
import retrofit2.Response
|
|
|
|
import retrofit2.Response
|
|
|
@ -51,6 +52,13 @@ interface UserApiService {
|
|
|
|
): Response<Unit>
|
|
|
|
): Response<Unit>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface QuoteApiService {
|
|
|
|
|
|
|
|
@GET("quote/{id}")
|
|
|
|
|
|
|
|
suspend fun getQuoteById(@Path("id")id : Int):Quote
|
|
|
|
|
|
|
|
@GET("quote/all")
|
|
|
|
|
|
|
|
suspend fun getAllQuote( @Query("index") index: Int, @Query("count") count: Int):List<Quote>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
object RetrofitInstance {
|
|
|
|
object RetrofitInstance {
|
|
|
|
private const val BASE_URL = "https://codefirst.iut.uca.fr/containers/WhatTheFantasy-web-services/api/v1/"
|
|
|
|
private const val BASE_URL = "https://codefirst.iut.uca.fr/containers/WhatTheFantasy-web-services/api/v1/"
|
|
|
|