Commit f5e79d38 authored by Kevin Funk's avatar Kevin Funk

github: Clarify API on Resource::getTransferJob

parent 0de6a6a0
......@@ -102,11 +102,11 @@ void Resource::revokeAccess(const QString &id, const QString &name, const QStrin
job->start();
}
KIO::TransferJob * Resource::getTransferJob(const QString &uri, const QString &token) const
KIO::TransferJob * Resource::getTransferJob(const QString &path, const QString &token) const
{
QUrl url = baseUrl;
url = url.adjusted(QUrl::StripTrailingSlash);
url.setPath(url.path() + uri);
url.setPath(url.path() + path);
KIO::TransferJob *job = KIO::get(url, KIO::Reload, KIO::HideProgressInfo);
if (!token.isEmpty())
job->addMetaData(QStringLiteral("customHTTPHeader"), "Authorization: token " + token);
......
......@@ -102,12 +102,12 @@ public:
private:
/**
* Get a TransferJob for the given URI and authorization token.
* Get a TransferJob for the given path and authorization token.
*
* @param uri The URI to be requested.
* @param path The path to be requested (i.e. "/user/orgs")
* @param token The authorization token to be set on the headers.
*/
KIO::TransferJob * getTransferJob(const QString &uri, const QString &token) const;
KIO::TransferJob * getTransferJob(const QString &path, const QString &token) const;
/**
* Retrieve the info of the name and the URL of each repo and append
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment