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

Commit d534f184 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

refactor: rename ReleaseInfo into GitLabReleaseInfo & ReleaseInfoApi into GitLabReleaseInfoApi

parent 1f921935
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -17,12 +17,15 @@

package foundation.e.apps.data.gitlab

import foundation.e.apps.data.gitlab.models.ReleaseInfo
import foundation.e.apps.data.gitlab.models.GitLabReleaseInfo
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path

interface ReleaseInfoApi {
/*
provide Client method for https://docs.gitlab.com/ee/api/releases/
 */
interface GitLabReleaseInfoApi {

    companion object {
        const val BASE_URL =
@@ -32,6 +35,6 @@ interface ReleaseInfoApi {
    @GET("{projectId}/releases")
    suspend fun getReleases(
        @Path("projectId") projectId: Int,
    ): Response<List<ReleaseInfo>>
    ): Response<List<GitLabReleaseInfo>>

}
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ package foundation.e.apps.data.gitlab.models

import com.squareup.moshi.Json

data class ReleaseInfo(
data class GitLabReleaseInfo(
    val name: String,
    @Json(name = "released_at")
    val releasedAt: String,
+4 −4
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import foundation.e.apps.data.cleanapk.CleanApkRetrofit
import foundation.e.apps.data.ecloud.EcloudApiInterface
import foundation.e.apps.data.exodus.ExodusTrackerApi
import foundation.e.apps.data.fdroid.FdroidApiInterface
import foundation.e.apps.data.gitlab.ReleaseInfoApi
import foundation.e.apps.data.gitlab.GitLabReleaseInfoApi
import foundation.e.apps.data.gitlab.UpdatableSystemAppsApi
import foundation.e.apps.data.gitlab.SystemAppDefinitionApi
import foundation.e.apps.data.parentalcontrol.fdroid.FDroidMonitorApi
@@ -153,13 +153,13 @@ class RetrofitApiModule {
    fun provideReleaseInfoApi(
        okHttpClient: OkHttpClient,
        moshi: Moshi,
    ): ReleaseInfoApi {
    ): GitLabReleaseInfoApi {
        return Retrofit.Builder()
            .baseUrl(ReleaseInfoApi.BASE_URL)
            .baseUrl(GitLabReleaseInfoApi.BASE_URL)
            .client(okHttpClient)
            .addConverterFactory(MoshiConverterFactory.create(moshi))
            .build()
            .create(ReleaseInfoApi::class.java)
            .create(GitLabReleaseInfoApi::class.java)
    }

    @Singleton