summaryrefslogtreecommitdiff
diff options
authorAndrew Dolgov <[email protected]>2025-05-17 12:49:41 +0300
committerAndrew Dolgov <[email protected]>2025-05-17 12:49:41 +0300
commit868c1cadad9a370d05f3ff72710bd488689bafdf (patch)
tree7113431dccda8d2d5bcc6035b532047a93603833
parentaa58ab1ce0ec3268a2d9fcf213b7163ccf77d885 (diff)
API/getFeeds: return feed last_error & update_intervalHEADmaster
-rw-r--r--classes/API.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/API.php b/classes/API.php
index 6db05198a..2a554e888 100644
--- a/classes/API.php
+++ b/classes/API.php
@@ -1,7 +1,7 @@
<?php
class API extends Handler {
- const API_LEVEL = 22;
+ const API_LEVEL = 23;
const STATUS_OK = 0;
const STATUS_ERR = 1;
@@ -618,7 +618,7 @@ class API extends Handler {
/* API only: -3 (Feeds::CATEGORY_ALL_EXCEPT_VIRTUAL) All feeds, excluding virtual feeds (e.g. Labels and such) */
$feeds_obj = ORM::for_table('ttrss_feeds')
- ->select_many('id', 'feed_url', 'cat_id', 'title', 'order_id')
+ ->select_many('id', 'feed_url', 'cat_id', 'title', 'order_id', 'last_error', 'update_interval')
->select_expr(SUBSTRING_FOR_DATE.'(last_updated,1,19)', 'last_updated')
->where('owner_uid', $_SESSION['uid'])
->order_by_asc('order_id')
@@ -645,6 +645,8 @@ class API extends Handler {
'cat_id' => (int) $feed->cat_id,
'last_updated' => (int) strtotime($feed->last_updated ?? ''),
'order_id' => (int) $feed->order_id,
+ 'last_error' => $feed->last_error,
+ 'update_interval' => (int) $feed->update_interval,
];
array_push($feeds, $row);