+ while ($line = db_fetch_assoc($result)) {
+
+ $attachments = get_article_enclosures($link, $line['id']);
+
+ $article = array(
+ "id" => $line["id"],
+ "title" => $line["title"],
+ "link" => $line["link"],
+ "labels" => get_article_labels($link, $line['id']),
+ "unread" => sql_bool_to_bool($line["unread"]),
+ "marked" => sql_bool_to_bool($line["marked"]),
+ "published" => sql_bool_to_bool($line["published"]),
+ "comments" => $line["comments"],
+ "author" => $line["author"],
+ "updated" => strtotime($line["updated"]),
+ "content" => $line["content"],
+ "feed_id" => $line["feed_id"],
+ "attachments" => $attachments
+ );
+
+ print json_encode($article);
+ }
+ }