MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / getFile

Method getFile

launcher/modplatform/flame/FlameAPI.cpp:200–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200Task::Ptr FlameAPI::getFile(const QString& addonId, const QString& fileId, std::shared_ptr<QByteArray> response) const
201{
202 auto netJob = makeShared<NetJob>(QString("Flame::GetFile"), APPLICATION->network());
203 netJob->addNetAction(
204 Net::ApiDownload::makeByteArray(QUrl(QString("https://api.curseforge.com/v1/mods/%1/files/%2").arg(addonId, fileId)), response));
205
206 QObject::connect(netJob.get(), &NetJob::failed, [addonId, fileId] { qDebug() << "Flame API file failure" << addonId << fileId; });
207
208 return netJob;
209}
210
211QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const
212{

Callers 3

openConnectionMethod · 0.80
processURLsMethod · 0.80
updateStateMethod · 0.80

Calls 5

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

Tested by

no test coverage detected