| 198 | } |
| 199 | |
| 200 | Task::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 | |
| 211 | QList<ResourceAPI::SortingMethod> FlameAPI::getSortingMethods() const |
| 212 | { |
no test coverage detected