MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / getFile

Method getFile

launcher/modplatform/flame/FlameAPI.cpp:150–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150std::pair<Task::Ptr, QByteArray*> FlameAPI::getFile(const QString& addonId, const QString& fileId) const
151{
152 auto netJob = makeShared<NetJob>(QString("Flame::GetFile"), APPLICATION->network());
153 auto [action, response] =
154 Net::ApiDownload::makeByteArray(QUrl(QString(BuildConfig.FLAME_BASE_URL + "/mods/%1/files/%2").arg(addonId, fileId)));
155 netJob->addNetAction(action);
156
157 QObject::connect(netJob.get(), &NetJob::failed, [addonId, fileId] { qDebug() << "Flame API file failure" << addonId << fileId; });
158
159 return { netJob, response };
160}
161
162QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const
163{

Callers 3

openConnectionMethod · 0.80
processURLsMethod · 0.80
updateStateMethod · 0.80

Calls 5

QUrlClass · 0.85
networkMethod · 0.80
addNetActionMethod · 0.80
QStringClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected