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

Commit cd97dfc2 authored by Hasib Prince's avatar Hasib Prince
Browse files

refactor: extracted constants

parent 2888c93a
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@ class CleanApkAppsRepositoryImpl(
            query,
            CleanApkRetrofit.APP_SOURCE_FOSS,
            CleanApkRetrofit.APP_TYPE_ANY,
            20,
            1,
            NUMBER_OF_ITEMS,
            NUMBER_OF_PAGES,
            searchBy
        )
    }
@@ -56,8 +56,8 @@ class CleanApkAppsRepositoryImpl(
            category,
            CleanApkRetrofit.APP_SOURCE_FOSS,
            CleanApkRetrofit.APP_TYPE_ANY,
            20,
            1
            NUMBER_OF_ITEMS,
            NUMBER_OF_PAGES
        )
    }

+18 −0
Original line number Diff line number Diff line
/*
 * Copyright MURENA SAS 2023
 * Apps  Quickly and easily install Android apps onto your device!
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package foundation.e.apps.api.cleanapk

import foundation.e.apps.api.cleanapk.data.download.Download
+2 −2
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ class CleanApkPWARepository(
            category,
            CleanApkRetrofit.APP_SOURCE_ANY,
            CleanApkRetrofit.APP_TYPE_PWA,
            20,
            1
            NUMBER_OF_ITEMS,
            NUMBER_OF_PAGES
        )
    }

+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,9 @@ import foundation.e.apps.api.cleanapk.data.download.Download
import foundation.e.apps.api.cleanapk.data.search.Search
import retrofit2.Response

const val NUMBER_OF_ITEMS = 20

const val NUMBER_OF_PAGES = 1
interface CleanApkRepository : BaseStoreRepository {
    suspend fun getSearchResult(query: String, searchBy: String? = null): Response<Search>
    suspend fun getAppsByCategory(category: String, paginationParameter: Any? = null): Response<Search>