MCPcopy Create free account
hub / github.com/PrismLauncher/PrismLauncher / getProject

Method getProject

launcher/modplatform/ResourceAPI.cpp:287–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287std::pair<Task::Ptr, QByteArray*> ResourceAPI::getProject(QString addonId) const
288{
289 auto project_url_optional = getInfoURL(addonId);
290 if (!project_url_optional.has_value())
291 return { nullptr, nullptr };
292
293 auto project_url = project_url_optional.value();
294
295 auto netJob = makeShared<NetJob>(QString("%1::GetProject").arg(addonId), APPLICATION->network());
296
297 auto [action, response] = Net::ApiDownload::makeByteArray(QUrl(project_url));
298 netJob->addNetAction(action);
299
300 return { netJob, response };
301}

Callers 6

modrinthProjectsTaskMethod · 0.80
flameProjectsTaskMethod · 0.80
getProjectsInfoMethod · 0.80
collectBlockedModsMethod · 0.80
getProjectInfoTaskMethod · 0.80

Calls 5

QUrlClass · 0.85
valueMethod · 0.80
networkMethod · 0.80
addNetActionMethod · 0.80
QStringClass · 0.50

Tested by

no test coverage detected