aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/modrinth/ModrinthAPI.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-05-17 18:25:08 -0300
committerflow <flowlnlnln@gmail.com>2022-05-17 18:25:08 -0300
commitff9f3cb31ff75c2d657146cf8fe646084439fd0f (patch)
tree6c098648df6a4da447aa305420709037115f81f0 /launcher/modplatform/modrinth/ModrinthAPI.h
parent17bbfe8d8951ddc7acca0222c6d2e38fb29eef25 (diff)
parentcc13310083fe8d0c3bb423fa3e31db7b1f7b25e1 (diff)
downloadPrismLauncher-ff9f3cb31ff75c2d657146cf8fe646084439fd0f.tar.gz
PrismLauncher-ff9f3cb31ff75c2d657146cf8fe646084439fd0f.tar.bz2
PrismLauncher-ff9f3cb31ff75c2d657146cf8fe646084439fd0f.zip
fix conflicts with develop
Diffstat (limited to 'launcher/modplatform/modrinth/ModrinthAPI.h')
-rw-r--r--launcher/modplatform/modrinth/ModrinthAPI.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthAPI.h b/launcher/modplatform/modrinth/ModrinthAPI.h
index 86852c94..6d642b5e 100644
--- a/launcher/modplatform/modrinth/ModrinthAPI.h
+++ b/launcher/modplatform/modrinth/ModrinthAPI.h
@@ -1,5 +1,24 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
+ *
+ * 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, version 3.
+ *
+ * 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/>.
+ */
+
#pragma once
+#include "BuildConfig.h"
#include "modplatform/ModAPI.h"
#include "modplatform/helpers/NetworkModAPI.h"
@@ -47,13 +66,13 @@ class ModrinthAPI : public NetworkModAPI {
return "";
}
- return QString(
- "https://api.modrinth.com/v2/search?"
- "offset=%1&"
- "limit=25&"
- "query=%2&"
- "index=%3&"
- "facets=[[%4],%5[\"project_type:mod\"]]")
+ return QString(BuildConfig.MODRINTH_PROD_URL +
+ "/search?"
+ "offset=%1&"
+ "limit=25&"
+ "query=%2&"
+ "index=%3&"
+ "facets=[[%4],%5[\"project_type:mod\"]]")
.arg(args.offset)
.arg(args.search)
.arg(args.sorting)
@@ -63,9 +82,10 @@ class ModrinthAPI : public NetworkModAPI {
inline auto getVersionsURL(VersionSearchArgs& args) const -> QString override
{
- return QString("https://api.modrinth.com/v2/project/%1/version?"
- "game_versions=[%2]"
- "loaders=[\"%3\"]")
+ return QString(BuildConfig.MODRINTH_PROD_URL +
+ "/project/%1/version?"
+ "game_versions=[%2]"
+ "loaders=[\"%3\"]")
.arg(args.addonId)
.arg(getGameVersionsString(args.mcVersions))
.arg(getModLoaderStrings(args.loader).join("\",\""));