refactor: de-duplicate common code in network mod APIs

This commit is contained in:
flow
2022-03-07 16:46:08 -03:00
parent f714adf6d2
commit 16bfafa29e
8 changed files with 109 additions and 133 deletions

View File

@ -0,0 +1,13 @@
#pragma once
#include "modplatform/ModAPI.h"
class NetworkModAPI : public ModAPI {
public:
void searchMods(CallerType* caller, SearchArgs&& args) const override;
void getVersions(CallerType* caller, const QString& addonId) const override;
protected:
virtual QString getModSearchURL(SearchArgs& args) const = 0;
virtual QString getVersionsURL(const QString& addonId) const = 0;
};