Created
December 5, 2018 08:15
-
-
Save AlexGladkov/79174e83fa7a550557dcde56be07e601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.sddhelp.data.providers.services | |
import io.reactivex.Observable | |
import io.reactivex.Single | |
import retrofit2.http.Field | |
import retrofit2.http.FormUrlEncoded | |
import retrofit2.http.POST | |
import ru.sddhelp.data.providers.models.ApiId | |
import ru.sddhelp.data.providers.models.ApiOrder | |
import ru.sddhelp.data.providers.models.ApiResponse | |
import ru.sddhelp.domain.contracts.RemoteContract | |
/** | |
* Created by agladkov on 19.03.18. | |
*/ | |
interface RemoteOrdersService { | |
@FormUrlEncoded | |
@POST("./hidden") | |
fun getOrdersList(@Field(RemoteContract.TOKEN) token: String): Observable<ApiResponse<Any>> | |
@FormUrlEncoded | |
@POST("./hidden") | |
fun createOrder(@Field(RemoteContract.TOKEN) token: String, | |
@Field(RemoteContract.DEVICE) device: String, | |
@Field(RemoteContract.PROBLEM) problem: Int, | |
@Field(RemoteContract.DESCRIPTION) description: String, | |
@Field(RemoteContract.LICENSE) license: Int): Observable<ApiResponse<Any>> | |
@FormUrlEncoded | |
@POST("./hidden") | |
fun rateOrder(@Field(RemoteContract.TOKEN) token: String, | |
@Field(RemoteContract.MARK) mark: Int, | |
@Field(RemoteContract.TO_ID) toId: Int, | |
@Field(RemoteContract.CATEGORY) category: String, | |
@Field(RemoteContract.COMMENT) comment: String): Single<ApiResponse<Any>> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment