All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.tinkoff.testops.droidherd.EmulatorsApi.kt Maven / Gradle / Ivy

Go to download

A library that parallelizes Android Test execution to all connected devices and emulators

There is a newer version: 1.0.0
Show newest version
package ru.tinkoff.testops.droidherd

import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*
import ru.tinkoff.testops.droidherd.api.DroidherdClientMetric
import ru.tinkoff.testops.droidherd.api.DroidherdSessionStatus
import ru.tinkoff.testops.droidherd.api.EmulatorRequest
import ru.tinkoff.testops.droidherd.api.SessionRequest

internal interface DroidherdClientApi {
    data class LoginResponse(val sessionId: String)

    @POST("api/v1/clients/{clientId}/login")
    fun login(
        @Header("Authorization") token: String,
        @Path("clientId") clientId: String
    ): Call


    @POST("api/v1/clients/{clientId}/sessions/{sessionId}")
    fun scale(
        @Header("Authorization") token: String,
        @Path("clientId") clientId: String,
        @Path("sessionId") sessionId: String,
        @Body requests: SessionRequest
    ): Call>

    @DELETE("api/v1/clients/{clientId}/sessions/{sessionId}")
    fun release(
        @Header("Authorization") token: String,
        @Path("clientId") clientId: String,
        @Path("sessionId") sessionId: String
    ): Call

    @GET("api/v1/clients/{clientId}/sessions/{sessionId}")
    fun status(
        @Header("Authorization") token: String,
        @Path("clientId") clientId: String,
        @Path("sessionId") sessionId: String
    ): Call

    @POST("api/v1/clients/{clientId}/sessions/{sessionId}/ping")
    fun ping(
        @Header("Authorization") token: String,
        @Path("clientId") clientId: String,
        @Path("sessionId") sessionId: String
    ): Call

    @POST("api/v1/clients/{clientId}/sessions/{sessionId}/metrics")
    fun postMetrics(
        @Header("Authorization") token: String,
        @Path("clientId") clientId: String,
        @Path("sessionId") sessionId: String,
        @Body metrics: List<@JvmSuppressWildcards DroidherdClientMetric>
    ): Call
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy