Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0338e75e authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

feature: add API method to fetch only latest release, & method to feth release based on gitlab tag

parent d534f184
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
package foundation.e.apps.data.gitlab

import foundation.e.apps.data.gitlab.models.GitLabReleaseInfo
import foundation.e.apps.data.gitlab.models.SystemAppInfo
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path
@@ -37,4 +38,18 @@ interface GitLabReleaseInfoApi {
        @Path("projectId") projectId: Int,
    ): Response<List<GitLabReleaseInfo>>


    @GET("{projectId}/releases/{gitlabTag}/downloads/json/{releaseType}.json")
    suspend fun getSystemAppInfoByTag(
        @Path("projectId") projectId: Int,
        @Path("gitlabTag") gitlabTag: String,
        @Path("releaseType") releaseType: String,
    ): Response<SystemAppInfo>


    @GET("{projectId}/releases/permalink/latest/downloads/json/{releaseType}.json")
    suspend fun getLatestSystemAppInfo(
        @Path("projectId") projectId: Int,
        @Path("releaseType") releaseType: String,
    ): Response<SystemAppInfo>
}