summaryrefslogtreecommitdiff
path: root/classes/api.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-11-23 20:22:02 +0400
committerAndrew Dolgov <[email protected]>2013-11-23 20:22:02 +0400
commit21bb3c064afe1ec043a45ad0a6026ddd9e75f152 (patch)
tree52472a772251d9707215033360860db438d5f7a9 /classes/api.php
parent5bcb7b61b01aca241b6012e8c09d43815a1c9169 (diff)
api: add note support for getHeadlines/getArticle (bump api version)
Diffstat (limited to 'classes/api.php')
-rw-r--r--classes/api.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/api.php b/classes/api.php
index aaa6bb9f6..0b5757a6b 100644
--- a/classes/api.php
+++ b/classes/api.php
@@ -2,7 +2,7 @@
class API extends Handler {
- const API_LEVEL = 7;
+ const API_LEVEL = 8;
const STATUS_OK = 0;
const STATUS_ERR = 1;
@@ -313,7 +313,7 @@ class API extends Handler {
if ($article_id) {
$query = "SELECT id,title,link,content,feed_id,comments,int_id,
- marked,unread,published,score,
+ marked,unread,published,score,note,
".SUBSTRING_FOR_DATE."(updated,1,16) as updated,
author,(SELECT title FROM ttrss_feeds WHERE id = feed_id) AS feed_title
FROM ttrss_entries,ttrss_user_entries
@@ -345,7 +345,8 @@ class API extends Handler {
"feed_id" => $line["feed_id"],
"attachments" => $attachments,
"score" => (int)$line["score"],
- "feed_title" => $line["feed_title"]
+ "feed_title" => $line["feed_title"],
+ "note" => $line["note"]
);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) {
@@ -703,6 +704,7 @@ class API extends Handler {
$headline_row["author"] = $line["author"];
$headline_row["score"] = (int)$line["score"];
+ $headline_row["note"] = $line["note"];
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) {
$headline_row = $p->hook_render_article_api(array("headline" => $headline_row));