summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build-release.yml2
-rw-r--r--.github/workflows/lint-eslint.yml2
-rw-r--r--AUTHORS.md10
-rw-r--r--CHANGELOG.md20
-rw-r--r--appinfo/info.xml2
-rw-r--r--composer.json4
-rw-r--r--composer.lock40
-rw-r--r--docs/admin.md13
-rw-r--r--docs/api/api-v1-2.md225
-rw-r--r--docs/api/api-v1-3.md223
-rw-r--r--docs/api/api-v2.md81
-rw-r--r--docs/developer.md12
-rw-r--r--docs/features/customCSS.md7
-rw-r--r--docs/features/integration.md16
-rw-r--r--docs/features/plugins.md51
-rw-r--r--docs/features/themes.md3
-rw-r--r--docs/troubleshooting.md39
-rw-r--r--l10n/ast.js72
-rw-r--r--l10n/ast.json72
-rw-r--r--l10n/es_MX.js2
-rw-r--r--l10n/es_MX.json2
-rw-r--r--l10n/fr.js16
-rw-r--r--l10n/fr.json16
-rw-r--r--l10n/sr@latin.js3
-rw-r--r--l10n/sr@latin.json3
-rw-r--r--l10n/uk.js1
-rw-r--r--l10n/uk.json1
-rw-r--r--mkdocs.yml23
-rw-r--r--package-lock.json597
-rw-r--r--package.json6
-rw-r--r--src/components/ContentTemplate.vue52
-rw-r--r--src/components/feed-display/FeedItemDisplay.vue5
-rw-r--r--src/components/feed-display/FeedItemDisplayList.vue24
-rw-r--r--src/components/feed-display/FeedItemRow.vue2
-rw-r--r--tests/command/feeds.bats9
-rw-r--r--tests/test_helper/feeds/Nextcloud.rss4
-rw-r--r--tests/test_helper/feeds/favicon.icobin0 -> 4286 bytes
-rw-r--r--tests/test_helper/feeds/heise.xml2
-rw-r--r--tests/test_helper/feeds/logo.pngbin0 -> 678 bytes
39 files changed, 1033 insertions, 629 deletions
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index b955bc663..c8f5a988a 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -52,7 +52,7 @@ jobs:
app_public_crt: ${{ secrets.APP_PUBLIC_CRT }}
- name: Upload app tarball to release
- uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df
+ uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd
id: attach_to_release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml
index e59028679..2fd40e8dd 100644
--- a/.github/workflows/lint-eslint.yml
+++ b/.github/workflows/lint-eslint.yml
@@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@v2.2
+ uses: skjnldsv/read-package-engines-version-actions@v3
id: versions
with:
fallbackNode: '^16'
diff --git a/AUTHORS.md b/AUTHORS.md
index 2fc07430d..3b3a41db7 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -22,6 +22,7 @@
* [Bernhard Posselt](mailto:bep@foryouandyourcustomers.com)
* [Thomas Müller](mailto:thomas.mueller@tmit.eu)
* [Hoàng Đức Hiếu](mailto:hdhoang@zahe.me)
+* [IgorA100](mailto:igora100@gmail.com)
* [Marco Nassabain](mailto:marco.nassabain@etu.unistra.fr)
* [rakekniven](mailto:mark.ziegler@rakekniven.de)
* [Daniel Opitz](mailto:git@copynpaste.de)
@@ -40,6 +41,7 @@
* [Xéfir Destiny](mailto:xefir@crystalyx.net)
* [devlinjunker](mailto:devlin.junker@gmail.com)
* [hydrian](mailto:ben.tyger@tygerclan.net)
+* [mortee](mailto:mortee@kavemalna.hu)
* [Daniel Opitz](mailto:danopz@users.noreply.github.com)
* [Daniel Rheinbay](mailto:danielrheinbay@gmail.com)
* [Lars Bensmann](mailto:lars@almosthappy.de)
@@ -52,7 +54,6 @@
* [Christoph Stenglein](mailto:christoph@christophstenglein.com)
* [Daniel Kesselberg](mailto:mail@danielkesselberg.de)
* [ELHADDAD Hamza](mailto:elhaddadhamza49@gmail.com)
-* [IgorA100](mailto:igora100@gmail.com)
* [Jakob Sack](mailto:mail@jakobsack.de)
* [ManuelSailer](mailto:github.com@manuel-sailer.de)
* [Qingping Hou](mailto:dave2008713@gmail.com)
@@ -75,9 +76,11 @@
* [Loki3000](mailto:github@labcms.ru)
* [Maik Kulbe](mailto:info@linux-web-development.de)
* [Manuel Sailer](mailto:github.com@manuel-sailer.de)
+* [Martin Vuille](mailto:jpmv27@yahoo.com)
* [Michael Gapczynski](mailto:mtgap@owncloud.com)
* [Nikita Chernyi](mailto:rakshazi@users.noreply.github.com)
* [Peter Hedlund](mailto:peter@peterandlinda.com)
+* [Petra Mirelli](mailto:80395360+iNtEgraIR2021@users.noreply.github.com)
* [Simon Spannagel](mailto:simonspa@kth.se)
* [bbBowser](mailto:carspi@mail.de)
* [benediktb](mailto:benedikt@blablub.de)
@@ -85,6 +88,7 @@
* [davidak](mailto:git@davidak.de)
* [hooger](mailto:horvathg.1988@gmail.com)
* [lsmooth](mailto:ls@lsmooth.de)
+* [mortee](mailto:mortee.github@kavemalna.hu)
* [s17t.net](mailto:mail+github@s17t.net)
* [Accalia](mailto:Accalia@Elementia.me)
* [Accalia Elementia](mailto:accalia@elementia.me)
@@ -109,6 +113,7 @@
* [Chris Aumann](mailto:me@chr4.org)
* [Chris Danser](mailto:skiingwiz@gmail.com)
* [Chris Noxz](mailto:chris@noxz.tech)
+* [Christof Dorner](mailto:christof@chdorner.com)
* [Christoph Wurst](mailto:ChristophWurst@users.noreply.github.com)
* [Clemens](mailto:clemens@clemensknost.de)
* [Colin W](mailto:cwmke@users.noreply.github.com)
@@ -138,10 +143,12 @@
* [Hendrik Leppelsack](mailto:hendrik@leppelsack.de)
* [Jasper Knockaert](mailto:jasper@knockaert.nl)
* [Jimmy Boucher](mailto:75694650+jboucher614@users.noreply.github.com)
+* [Josh](mailto:josh.t.richards@gmail.com)
* [Kevin Decherf](mailto:kevin@kdecherf.com)
* [Kuba Orlik](mailto:kontakt@kuba-orlik.name)
* [Maceček Richard](mailto:46937538+macecekrichard@users.noreply.github.com)
* [Marc Cousin](mailto:marc.cousin@people-doc.com)
+* [Marcus Nitzschke](mailto:mail@kendix.org)
* [Martin Ferretti](mailto:ferrettimartin@protonmail.com)
* [Matthias](mailto:matthias.baier@mabaart.de)
* [Matthias Blümel](mailto:user@inanna.local)
@@ -196,6 +203,7 @@
* [markusj](mailto:markusj@users.noreply.github.com)
* [mnassabain](mailto:34754819+mnassabain@users.noreply.github.com)
* [mormegil](mailto:mormegil@centrum.cz)
+* [nextcloud-command](mailto:nextcloud-command@users.noreply.github.com)
* [nextcloud486153](mailto:78801830+nextcloud486153@users.noreply.github.com)
* [nexus-uw](mailto:you@example.com)
* [repat](mailto:repat@repat.de)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a32802171..9a47ff450 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,17 +2,29 @@
All notable changes to this project will be documented in this file.
The format is mostly based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), older entries don't fully match.
+You can also check [on GitHub](https://github.com/nextcloud/news/releases), the release notes there are generated automatically and include every pull request.
+
# Unreleased
## [25.x.x]
### Changed
-- make occ news:updater:job exit with code 2 if last update was too long ago (#2590)
-- Fix deprecated variable reference in ExportController.php (#2602)
-- Add support for Nextcloud 29 (#2611)
### Fixed
-
# Releases
+## [25.0.0-alpha6] - 2024-05-07
+### Changed
+- Improve layout of feed item row (#2569)
+
+### Fixed
+- Reset content scroll position when feed item is changed (#2569)
+- Fix link to feed in article header (#2569)
+
+## [25.0.0-alpha5] - 2024-04-01
+### Changed
+- make occ news:updater:job exit with code 2 if last update was too long ago (#2590)
+- Fix deprecated variable reference in ExportController.php (#2602)
+- Add support for Nextcloud 29 (#2611)
+
## [25.0.0-alpha4] - 2023-01-25
### Changed
- Add DB index for news_feeds.deleted_at (#2526)
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 77f5e9bdb..f14247f9f 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -21,7 +21,7 @@ Create a [feature request](https://github.com/nextcloud/news/discussions/new)
Report a [feed issue](https://github.com/nextcloud/news/discussions/new)
]]></description>
- <version>25.0.0-alpha4</version>
+ <version>25.0.0-alpha6</version>
<licence>agpl</licence>
<author>Benjamin Brahmer</author>
<author>Sean Molenaar</author>
diff --git a/composer.json b/composer.json
index 7860ff4f8..5be10c03f 100644
--- a/composer.json
+++ b/composer.json
@@ -55,9 +55,9 @@
},
"require-dev": {
"phpunit/phpunit": "9.6.*",
- "squizlabs/php_codesniffer": "^3.9.0",
+ "squizlabs/php_codesniffer": "^3.9.2",
"phpstan/phpstan": "^1.10.60",
- "phpstan/phpstan-doctrine": "^1.3.63",
+ "phpstan/phpstan-doctrine": "^1.3.69",
"phpstan/phpstan-strict-rules": "^1.5.2",
"phpstan/phpstan-phpunit": "^1.3.16",
"phpstan/extension-installer": "^1.3.1",
diff --git a/composer.lock b/composer.lock
index e35d87fca..b9da65d6e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "eeab2e04df10298919610630ac90425c",
+ "content-hash": "fb327fe6611739bfeaee09756f809976",
"packages": [
{
"name": "arthurhoaro/favicon",
@@ -1359,16 +1359,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.10.63",
+ "version": "1.10.67",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "ad12836d9ca227301f5fb9960979574ed8628339"
+ "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ad12836d9ca227301f5fb9960979574ed8628339",
- "reference": "ad12836d9ca227301f5fb9960979574ed8628339",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493",
+ "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493",
"shasum": ""
},
"require": {
@@ -1411,13 +1411,9 @@
{
"url": "https://github.com/phpstan",
"type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
- "type": "tidelift"
}
],
- "time": "2024-03-18T16:53:53+00:00"
+ "time": "2024-04-16T07:22:02+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",
@@ -1469,21 +1465,21 @@
},
{
"name": "phpstan/phpstan-doctrine",
- "version": "1.3.63",
+ "version": "1.3.69",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-doctrine.git",
- "reference": "6ccde2b243e30ba47f7cd29f87fb752263bcb25c"
+ "reference": "ac567407e750b94e2133dace33b19082ad9ed751"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/6ccde2b243e30ba47f7cd29f87fb752263bcb25c",
- "reference": "6ccde2b243e30ba47f7cd29f87fb752263bcb25c",
+ "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/ac567407e750b94e2133dace33b19082ad9ed751",
+ "reference": "ac567407e750b94e2133dace33b19082ad9ed751",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
- "phpstan/phpstan": "^1.10.63"
+ "phpstan/phpstan": "^1.10.64"
},
"conflict": {
"doctrine/collections": "<1.0",
@@ -1535,9 +1531,9 @@
"description": "Doctrine extensions for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-doctrine/issues",
- "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.3.63"
+ "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.3.69"
},
- "time": "2024-03-18T18:05:58+00:00"
+ "time": "2024-04-18T12:56:14+00:00"
},
{
"name": "phpstan/phpstan-phpunit",
@@ -3077,16 +3073,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.9.0",
+ "version": "3.9.2",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b"
+ "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
- "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/aac1f6f347a5c5ac6bc98ad395007df00990f480",
+ "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480",
"shasum": ""
},
"require": {
@@ -3153,7 +3149,7 @@
"type": "open_collective"
}
],
- "time": "2024-02-16T15:06:51+00:00"
+ "time": "2024-04-23T20:25:34+00:00"
},
{
"name": "theseer/tokenizer",
diff --git a/docs/admin.md b/docs/admin.md
index b645219e5..8a180fbb0 100644
--- a/docs/admin.md
+++ b/docs/admin.md
@@ -1,10 +1,14 @@
# Admin
+
Welcome to the Admin documentation this page explains some of the configuration options for news.
+
## System Cron
+
Nextcloud uses cron to run regular jobs, News relies on the Job system to execute the feed updates.
Alternatively you may use an [external updater](https://nextcloud.github.io/news/clients/#update-clients), in this case you need to disable the system cron in the settings.
## Auto purge count
+
- The default value is 200.
- To disable this feature, use -1.
- Unread and starred items are not deleted.
@@ -18,29 +22,34 @@ In this case the limit will be 210 instead of 200, for that feed.
This is needed to prevent items from reappearing in the feed.
## Purge unread items
+
This changes the behavior of the auto purging to also purge unread items. This is useful if you have users with a lot of unread items.
**Starred items are always kept.**
## Explore Service
+
If you are using the News app in your company/community, it might be interesting to offer your users a bunch of easily to discover default feeds. You could also create a website where people can add and up-vote news feeds like bigger cloud feed readers like Feedly do it or even convert their APIs into a service for the News app (if someone wants to provide one for the News app, feel free to contact us by creating an issue in the bug tracker).
The URL should be a path to a directory which contains a JSON file in the format of **feeds.LANG_CODE.json** where LANG_CODE is a two character language code (e.g. **en** or **de**).
-For example, entering the URL **https://domain.com/directory** as explore URL will produce the following request for German users:
+For example, entering the URL **<https://domain.com/directory>** as explore URL will produce the following request for German users:
GET https://domain.com/directory/feeds.de.json
**Do not forget to implement [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) in your API, otherwise the request will fail!**
## Update Interval
+
The update interval is used to determine when the next update of all feeds should be done.
By default, the value is set to 3600 seconds (1 hour) You can configure this interval as an administrator.
The new value is only applied after the next run of the updater.
### What is a good update interval?
+
That depends on your individual needs.
Please keep in mind that the lower you set your update interval, the more traffic is generated.
### Can I set individual update intervals per feed/user?
-No, that is not possible. \ No newline at end of file
+
+No, that is not possible.
diff --git a/docs/api/api-v1-2.md b/docs/api/api-v1-2.md
index 3d8b22426..e70eb9b73 100644
--- a/docs/api/api-v1-2.md
+++ b/docs/api/api-v1-2.md
@@ -23,6 +23,7 @@ You have to design your app with these things in mind!:
* **Use a library to compare versions, ideally one that uses semantic versioning**
## Authentication & Basics
+
Because REST is stateless you have to send user and password each time you access the API. Therefore running Nextcloud **with SSL is highly recommended** otherwise **everyone in your network can log your credentials**.
The base URL for all calls is:
@@ -42,11 +43,13 @@ where $CREDENTIALS is:
base64(USER:PASSWORD)
## How To Sync
+
This is a small overview over how you should sync your articles with the Nextcloud News app. For more fine-grained details about the API see further down.
-All routes are given relative to the base API url (e.g.: https://yournextcloud.com/index.php/apps/news/api/v1-2)
+All routes are given relative to the base API url (e.g.: <https://yournextcloud.com/index.php/apps/news/api/v1-2>)
### Initial Sync
+
The intial sync happens, when a user adds a Nextcloud account in your app. In that case you should fetch all feeds, folders and unread or starred articles from the News app. Do not fetch all articles, not only because it syncs faster, but also because the user is primarily interested in unread articles. To fetch all unread and starred articles, you must call 4 routes:
* **unread articles**: GET /items?type=3&getRead=false&batchSize=-1
@@ -57,6 +60,7 @@ The intial sync happens, when a user adds a Nextcloud account in your app. In th
The JSON response structures can be viewed further down.
### Syncing
+
When syncing, you want to push read/unread and starred/unstarred items to the server and receive new and updated items, feeds and folders. To do that, call the following routes:
* **Notify the News app of unread articles**: PUT /items/unread/multiple {"items": [1, 3, 5] }
@@ -67,31 +71,32 @@ When syncing, you want to push read/unread and starred/unstarred items to the se
* **Get new feeds**: GET /feeds
* **Get new items and modified items**: GET /items/updated?lastModified=12123123123&type=3
-
## Accessing API from a web application
**News 1.401** implements CORS which allows web applications to access the API. **To access the API in a webapp you need to send the correct authorization header instead of simply putting auth data into the URL!**. An example request in jQuery would look like this:
```js
$.ajax({
- type: 'GET',
- url: 'https://yournextcloud.com/index.php/apps/news/api/v1-2/version',
- contentType: 'application/json',
- success: function (response) {
- // handle success
- },
- error: function () {
- // handle errors
- },
- beforeSend: function (xhr) {
- var username = 'john';
- var password = 'doe';
- var auth = btoa(username + ':' + password);
- xhr.setRequestHeader('Authorization', 'Basic ' + auth);
- }
+ type: 'GET',
+ url: 'https://yournextcloud.com/index.php/apps/news/api/v1-2/version',
+ contentType: 'application/json',
+ success: function (response) {
+ // handle success
+ },
+ error: function () {
+ // handle errors
+ },
+ beforeSend: function (xhr) {
+ var username = 'john';
+ var password = 'doe';
+ var auth = btoa(username + ':' + password);
+ xhr.setRequestHeader('Authorization', 'Basic ' + auth);
+ }
});
```
+
An example with AngularJS would look like this:
+
```js
angular.module('YourApp', [])
.config(['$httpProvider', '$provide', function ($httpProvider, $provide) {
@@ -129,14 +134,17 @@ angular.module('YourApp', [])
```
## Input
+
In general the input parameters can be in the URL or request body, the App Framework doesnt differentiate between them.
So JSON in the request body like:
-```jsonc
+
+```json
{
"id": 3
}
```
+
will be treated the same as
/?id=3
@@ -149,11 +157,13 @@ It is recommended though that you use the following convention:
* **DELETE**: parameters as JSON in the request body
## Output
+
The output is JSON.
## API Endpoints
### Folders
+
#### Get all folders
* **Status**: Implemented
@@ -161,7 +171,8 @@ The output is JSON.
* **Route**: /folders
* **Parameters**: none
* **Returns**:
-```jsonc
+
+```json
{
"folders": [
{
@@ -173,22 +184,26 @@ The output is JSON.
```
#### Create a folder
+
Creates a new folder and returns a new folder object
* **Status**: Implemented
* **Method**: POST
* **Route**: /folders
* **Parameters**:
-```jsonc
+
+```json
{
"name": "folder name"
}
```
+
* **Return codes**:
- * **HTTP 409**: If the folder exists already
- * **HTTP 422**: If the folder name is invalid (for instance empty)
+* **HTTP 409**: If the folder exists already
+* **HTTP 422**: If the folder name is invalid (for instance empty)
* **Returns**:
-```jsonc
+
+```json
{
"folders": [
{
@@ -200,6 +215,7 @@ Creates a new folder and returns a new folder object
```
#### Delete a folder
+
Deletes a folder with the id folderId and all the feeds it contains
* **Status**: Implemented
@@ -207,25 +223,28 @@ Deletes a folder with the id folderId and all the feeds it contains
* **Route**: /folders/{folderId}
* **Parameters**: none
* **Return codes**:
- * **HTTP 404**: If the folder does not exist
+* **HTTP 404**: If the folder does not exist
* **Returns**: nothing
#### Rename a folder
+
Only the name can be updated
* **Status**: Implemented
* **Method**: PUT
* **Route**: /folders/{folderId}
* **Parameters**:
-```jsonc
+
+```json
{
"name": "folder name"
}
```
+
* **Return codes**:
- * **HTTP 409**: If the folder name does already exist
- * **HTTP 404**: If the folder does not exist
- * **HTTP 422**: If the folder name is invalid (for instance empty)
+* **HTTP 409**: If the folder name does already exist
+* **HTTP 404**: If the folder does not exist
+* **HTTP 422**: If the folder name is invalid (for instance empty)
* **Returns**: nothing
#### Mark items of a folder as read
@@ -234,15 +253,17 @@ Only the name can be updated
* **Method**: PUT
* **Route**: /folders/{folderId}/read
* **Parameters**:
-```jsonc
+
+```json
{
// mark all items read lower than equal that id
// this is mean to prevent marking items as read which the client/user does not yet know of
"newestItemId": 10
}
```
+
* **Return codes**:
- * **HTTP 404**: If the feed does not exist
+* **HTTP 404**: If the feed does not exist
* **Returns**: nothing
### Feeds
@@ -261,7 +282,8 @@ The following attributes are **not sanitized** meaning: including them in your w
* **Route**: /feeds
* **Parameters**: none
* **Returns**:
-```jsonc
+
+```json
{
"feeds": [
{
@@ -290,23 +312,27 @@ The following attributes are **not sanitized** meaning: including them in your w
```
#### Create a feed
+
Creates a new feed and returns the feed
* **Status**: Implemented
* **Method**: POST
* **Route**: /feeds
* **Parameters**:
-```jsonc
+
+```json
{
"url": "http:\/\/www.cyanogenmod.org\/wp-content\/themes\/cyanogenmod\/images\/favicon.ico",
"folderId": 81 // id of the parent folder, null for root
}
```
+
* **Return codes**:
- * **HTTP 409**: If the feed exists already
- * **HTTP 422**: If the feed cant be read (most likely contains errors)
+* **HTTP 409**: If the feed exists already
+* **HTTP 422**: If the feed cant be read (most likely contains errors)
* **Returns**:
-```jsonc
+
+```json
{
"feeds": [
{
@@ -327,6 +353,7 @@ Creates a new feed and returns the feed
```
#### Delete a feed
+
Deletes a feed with the id feedId and all of its items
* **Status**: Implemented
@@ -334,7 +361,7 @@ Deletes a feed with the id feedId and all of its items
* **Route**: /feeds/{feedId}
* **Parameters**: none
* **Return codes**:
- * **HTTP 404**: If the feed does not exist
+* **HTTP 404**: If the feed does not exist
* **Returns**: nothing
#### Move a feed to a different folder
@@ -343,13 +370,15 @@ Deletes a feed with the id feedId and all of its items
* **Method**: PUT
* **Route**: /feeds/{feedId}/move
* **Parameters**:
-```jsonc
+
+```json
{
"folderId": null // id of the parent folder, null for root
}
```
+
* **Return codes**:
- * **HTTP 404**: If the feed does not exist
+* **HTTP 404**: If the feed does not exist
* **Returns**: nothing
#### Rename a feed
@@ -358,13 +387,15 @@ Deletes a feed with the id feedId and all of its items
* **Method**: PUT
* **Route**: /feeds/{feedId}/rename
* **Parameters**:
-```jsonc
+
+```json
{
"feedTitle": "New Title"
}
```
+
* **Return codes**:
- * **HTTP 404**: If the feed does not exist
+* **HTTP 404**: If the feed does not exist
* **Returns**: nothing
#### Mark items of a feed as read
@@ -373,18 +404,19 @@ Deletes a feed with the id feedId and all of its items
* **Method**: PUT
* **Route**: /feeds/{feedId}/read
* **Parameters**:
-```jsonc
+
+```json
{
// mark all items read lower than equal that id
// this is mean to prevent marking items as read which the client/user does not yet know of
"newestItemId": 10
}
```
+
* **Return codes**:
- * **HTTP 404**: If the feed does not exist
+* **HTTP 404**: If the feed does not exist
* **Returns**: nothing
-
### Items
#### Sanitation
@@ -400,6 +432,7 @@ The following attributes are **not sanitized** meaning: including them in your w
* **mediaDescription**
#### Types
+
| Name | Default | Types |
|------------------|---------|--------------|
| author | null | string\|null |
@@ -422,13 +455,15 @@ The following attributes are **not sanitized** meaning: including them in your w
| unread | false | bool |
| updatedDate | | string\|null |
| url | | string\|null |
-
+
#### Get items
+
* **Status**: Implemented
* **Method**: GET
* **Route**: /items
* **Parameters**:
-```jsonc
+
+```json
{
"batchSize": 10, // the number of items that should be returned, defaults to -1, new in 5.2.3: -1 returns all items
"offset": 30, // only return older (lower than equal that id) items than the one with id 30
@@ -438,8 +473,10 @@ The following attributes are **not sanitized** meaning: including them in your w
"oldestFirst": false // implemented in 3.002, if true it reverse the sort order
}
```
+
* **Returns**:
-```jsonc
+
+```json
{
"items": [
{
@@ -467,12 +504,14 @@ The following attributes are **not sanitized** meaning: including them in your w
```
##### Example
+
Autopaging would work like this:
* Get the **first 20** items from a feed with **id 12**
**GET /items**: