Update call to only retrieve the raw type that's needed. Issue #50

This commit is contained in:
Morgan McMillian 2019-08-03 16:53:22 -07:00
parent aba4a2bdea
commit 3b2b578533

View file

@ -338,7 +338,7 @@ void Pnut::getStream(QString endpoint, Pnut::RequestType rtype)
QUrl url(PNUT_API_ROOT + endpoint);
KQOAuthParameters parameters;
parameters.insert("count", "50");
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
switch (rtype)
{
case Pnut::STREAM_NEWER:
@ -430,7 +430,7 @@ void Pnut::getThread(QString pid)
{
QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/thread");
KQOAuthParameters parameters;
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
req_map[++req_id] = ":thread";
getRequest(url, parameters, req_id);
}
@ -439,7 +439,7 @@ void Pnut::setBookmark(QString pid)
{
QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/bookmark");
KQOAuthParameters parameters;
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
req_map[++req_id] = ":bookmark";
putRequest(url, parameters, req_id);
}
@ -448,7 +448,7 @@ void Pnut::deleteBookmark(QString pid)
{
QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/bookmark");
KQOAuthParameters parameters;
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
req_map[++req_id] = ":bookmark";
deleteRequest(url, parameters, req_id);
}
@ -456,7 +456,7 @@ void Pnut::deleteBookmark(QString pid)
void Pnut::repost(QString pid) {
QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/repost");
KQOAuthParameters parameters;
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
req_map[++req_id] = ":repost";
putRequest(url, parameters, req_id);
}
@ -465,7 +465,7 @@ void Pnut::deleteRepost(QString pid)
{
QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/repost");
KQOAuthParameters parameters;
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
req_map[++req_id] = ":repost";
deleteRequest(url, parameters, req_id);
}
@ -538,7 +538,7 @@ void Pnut::getPost(QString pid)
{
QUrl url(PNUT_API_ROOT + "/posts/" + pid);
KQOAuthParameters parameters;
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
req_map[++req_id] = ":getpost:" + pid;
getRequest(url, parameters, req_id);
}
@ -548,7 +548,7 @@ void Pnut::getUserStream(QString uid)
QUrl url(PNUT_API_ROOT + "/users/" + uid + "/posts");
KQOAuthParameters parameters;
parameters.insert("count", "150");
parameters.insert("include_raw", "1");
parameters.insert("include_post_raw", "1");
req_map[++req_id] = ":userstream";
getRequest(url, parameters, req_id);
}