com.deque.networking.models.devtools.AxeDevToolsAccessTokenInterface.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of axe-devtools-android-data Show documentation
Show all versions of axe-devtools-android-data Show documentation
The Axe Devtools Android Data Library
package com.deque.networking.models.devtools
import com.deque.axe.android.AxeResult
import com.deque.networking.models.DEFAULT_CONTENT_TYPE
import com.deque.networking.models.devtools.serializable.AxeDevToolsResultKey
import com.deque.networking.models.devtools.serializable.AxeDevToolsResultSummaryResponse
import com.deque.networking.models.devtools.serializable.UserInfo
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Headers
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import retrofit2.http.Query
interface AxeDevToolsAccessTokenInterface {
@POST("/attest/result/axe")
@Headers(DEFAULT_CONTENT_TYPE)
suspend fun uploadResult(
@Header("authorization") bearerToken: String?,
@Body axeResult: AxeResult
): Result
@POST("/attest/result/axe")
@Headers(DEFAULT_CONTENT_TYPE)
suspend fun uploadResult(@Body axeResult: AxeResult?): Result
@DELETE("/attest/result/{userId}/{packageName}/{resultId}")
@Headers(DEFAULT_CONTENT_TYPE)
suspend fun deleteResult(
@Header("Authorization") bearerToken: String?,
@Path("userId") userId: String,
@Path("packageName") packageName: String,
@Path("resultId") resultId: String
): Result
@GET("/attest/result/axe/{userId}/{packageName}/{resultId}")
@Headers(DEFAULT_CONTENT_TYPE)
suspend fun getAxeDevToolsResultAxe(
@Header("Authorization") bearerToken: String?,
@Path("userId") userId: String,
@Path("packageName") packageName: String,
@Path("resultId") resultId: String
): Result
@POST("/attest/result/tag/{userId}/{packageName}/{resultId}")
@Headers(DEFAULT_CONTENT_TYPE)
suspend fun postAxeDevToolsResultTag(
@Header("authorization") bearerToken: String?,
@Path("userId") userId: String,
@Path("packageName") packageName: String,
@Path("resultId") resultId: String,
@Body tags: TagsSet?
): Result
@GET("/attest/results/summaries")
@Headers(DEFAULT_CONTENT_TYPE)
suspend fun getSummariesByUser(
@Header("authorization") bearerToken: String?,
@Query("user") user: String,
): Result
@PUT("/attest/results/summaries/{userId}/{packageName}/{resultId}/name")
@Headers("Content-Type: text/plain")
suspend fun setScanName(
@Header("authorization") bearerToken: String?,
@Path("userId") userId: String,
@Path("packageName") packageName: String,
@Path("resultId") resultId: String,
@Body scanName: String
): Result
@GET("/attest/user")
suspend fun getUserInfo(@Header("authorization") bearerToken: String?): Result
}