working test for nb
This commit is contained in:
parent
6e8d4953e0
commit
4ab483d14a
@ -307,7 +307,8 @@ NetworkResult NetworkFactory::performNetworkOperation(const QString& url,
|
||||
return result;
|
||||
}
|
||||
|
||||
NetworkResult::NetworkResult() {}
|
||||
NetworkResult::NetworkResult()
|
||||
: m_networkError(QNetworkReply::NetworkError::NoError), m_contentType(QString()), m_cookies({}) {}
|
||||
|
||||
NetworkResult::NetworkResult(QNetworkReply::NetworkError err, const QString& ct, const QList<QNetworkCookie>& cook)
|
||||
: m_networkError(err), m_contentType(ct), m_cookies(cook) {}
|
||||
|
@ -2,7 +2,8 @@
|
||||
#define NEWSBLUR_DEFINITIONS_H
|
||||
|
||||
// Misc.
|
||||
#define NEWSBLUR_DEFAULT_BATCH_SIZE 500
|
||||
#define NEWSBLUR_DEFAULT_BATCH_SIZE 500
|
||||
#define NEWSBLUS_AUTH_COOKIE "newsblur_sessionid"
|
||||
|
||||
// URLs.
|
||||
#define NEWSBLUR_URL "https://newsblur.com"
|
||||
|
@ -57,6 +57,9 @@ LoginResult NewsBlurNetwork::login(const QNetworkProxy& proxy) {
|
||||
|
||||
res.decodeBaseResponse(doc);
|
||||
res.m_userId = doc.object()["user_id"].toInt();
|
||||
res.m_sessiodId = boolinq::from(network_result.m_cookies).firstOrDefault([](const QNetworkCookie& c) {
|
||||
return c.name() == QSL(NEWSBLUS_AUTH_COOKIE);
|
||||
}).value();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user