Allow to refresh RSS item(s) via WebAPI

This commit is contained in:
Vladimir Golovnev (Glassez) 2019-08-11 14:52:51 +03:00
parent 2d28f50acd
commit e649559650
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
2 changed files with 11 additions and 0 deletions

View File

@ -91,6 +91,16 @@ void RSSController::itemsAction()
setResult(jsonVal.toObject());
}
void RSSController::refreshItemAction()
{
checkParams({"itemPath"});
const QString itemPath {params()["itemPath"]};
RSS::Item *item = RSS::Session::instance()->itemByPath(itemPath);
if (item)
item->refresh();
}
void RSSController::setRuleAction()
{
checkParams({"ruleName", "ruleDef"});

View File

@ -44,6 +44,7 @@ private slots:
void removeItemAction();
void moveItemAction();
void itemsAction();
void refreshItemAction();
void setRuleAction();
void renameRuleAction();
void removeRuleAction();