diff options
| author | 2022-08-08 12:04:02 +0200 | |
|---|---|---|
| committer | 2022-08-08 12:04:02 +0200 | |
| commit | 82ac1d1e676f93b1567eba608c00c6edaf401a9e (patch) | |
| tree | 1b3609df25f3eb1892aa7d359f52b82d680830a7 /p/api/fever.php | |
| parent | 240afa7d4dcf33de4575a1531e2db3c9f4400c1f (diff) | |
Refactor entry-to-GReader API format (#4490)
* Refactor entry to GReader API format
Some code was copied in two locations and not completely uniform.
Cleaning of related variables and functions (e.g. better types for entries and categories as objects vs. as IDs).
Usecase: I need to call the same GReader-compatible serialization from an extension
* Fixed some edge cases
* Keep summary instead of content
`summary` and `content` seems to be used interchangeably in the Google Reader API. We have been using `summary` for our client API and `content` in our export/import, so stick to that.
Diffstat (limited to 'p/api/fever.php')
| -rw-r--r-- | p/api/fever.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/p/api/fever.php b/p/api/fever.php index d7d4ca603..b7f9b9167 100644 --- a/p/api/fever.php +++ b/p/api/fever.php @@ -365,7 +365,7 @@ class FeverAPI /** @var FreshRSS_Feed $feed */ foreach ($myFeeds as $feed) { - $ids[$feed->category()][] = $feed->id(); + $ids[$feed->categoryId()][] = $feed->id(); } foreach($ids as $category => $feedIds) { @@ -493,7 +493,7 @@ class FeverAPI } $items[] = array( 'id' => '' . $entry->id(), - 'feed_id' => $entry->feed(false), + 'feed_id' => $entry->feedId(), 'title' => escapeToUnicodeAlternative($entry->title(), false), 'author' => escapeToUnicodeAlternative(trim($entry->authors(true), '; '), false), 'html' => $entry->content(), |
