1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-05-01 19:34:06 +02:00

update to match folderId null for the root folder

Signed-off-by: anoy <anoymouserver+github@mailbox.org>
This commit is contained in:
anoy 2020-11-11 22:32:11 +01:00
parent a9bd413008
commit 05598a7f36

View File

@ -132,7 +132,7 @@ angular.module('YourApp', [])
In general the input parameters can be in the URL or request body, the App Framework doesnt differentiate between them. 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: So JSON in the request body like:
```json ```jsonc
{ {
"id": 3 "id": 3
} }
@ -159,7 +159,7 @@ The output is JSON.
* **Route**: /folders * **Route**: /folders
* **Parameters**: none * **Parameters**: none
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"folders": [ "folders": [
{ {
@ -177,7 +177,7 @@ Creates a new folder and returns a new folder object
* **Method**: POST * **Method**: POST
* **Route**: /folders * **Route**: /folders
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"name": "folder name" "name": "folder name"
} }
@ -186,7 +186,7 @@ Creates a new folder and returns a new folder object
* **HTTP 409**: If the folder exists already * **HTTP 409**: If the folder exists already
* **HTTP 422**: If the folder name is invalid (for instance empty) * **HTTP 422**: If the folder name is invalid (for instance empty)
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"folders": [ "folders": [
{ {
@ -215,7 +215,7 @@ Only the name can be updated
* **Method**: PUT * **Method**: PUT
* **Route**: /folders/{folderId} * **Route**: /folders/{folderId}
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"name": "folder name" "name": "folder name"
} }
@ -232,7 +232,7 @@ Only the name can be updated
* **Method**: PUT * **Method**: PUT
* **Route**: /folders/{folderId}/read * **Route**: /folders/{folderId}/read
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
// mark all items read lower than equal that id // 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 // this is mean to prevent marking items as read which the client/user does not yet know of
@ -259,7 +259,7 @@ The following attributes are **not sanitized** meaning: including them in your w
* **Route**: /feeds * **Route**: /feeds
* **Parameters**: none * **Parameters**: none
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"feeds": [ "feeds": [
{ {
@ -294,17 +294,17 @@ Creates a new feed and returns the feed
* **Method**: POST * **Method**: POST
* **Route**: /feeds * **Route**: /feeds
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"url": "http:\/\/www.cyanogenmod.org\/wp-content\/themes\/cyanogenmod\/images\/favicon.ico", "url": "http:\/\/www.cyanogenmod.org\/wp-content\/themes\/cyanogenmod\/images\/favicon.ico",
"folderId": 81 // id of the parent folder, 0 for root "folderId": 81 // id of the parent folder, null for root
} }
``` ```
* **Return codes**: * **Return codes**:
* **HTTP 409**: If the feed exists already * **HTTP 409**: If the feed exists already
* **HTTP 422**: If the feed cant be read (most likely contains errors) * **HTTP 422**: If the feed cant be read (most likely contains errors)
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"feeds": [ "feeds": [
{ {
@ -341,9 +341,9 @@ Deletes a feed with the id feedId and all of its items
* **Method**: PUT * **Method**: PUT
* **Route**: /feeds/{feedId}/move * **Route**: /feeds/{feedId}/move
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"folderId": 0 // id of the parent folder, 0 for root "folderId": null // id of the parent folder, null for root
} }
``` ```
* **Return codes**: * **Return codes**:
@ -356,9 +356,9 @@ Deletes a feed with the id feedId and all of its items
* **Method**: PUT * **Method**: PUT
* **Route**: /feeds/{feedId}/rename * **Route**: /feeds/{feedId}/rename
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"feedTitle": 'New Title' "feedTitle": "New Title"
} }
``` ```
* **Return codes**: * **Return codes**:
@ -371,7 +371,7 @@ Deletes a feed with the id feedId and all of its items
* **Method**: PUT * **Method**: PUT
* **Route**: /feeds/{feedId}/read * **Route**: /feeds/{feedId}/read
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
// mark all items read lower than equal that id // 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 // this is mean to prevent marking items as read which the client/user does not yet know of
@ -402,7 +402,7 @@ The following attributes are **not sanitized** meaning: including them in your w
* **Method**: GET * **Method**: GET
* **Route**: /items * **Route**: /items
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"batchSize": 10, // the number of items that should be returned, defaults to -1, new in 5.2.3: -1 returns all items "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 "offset": 30, // only return older (lower than equal that id) items than the one with id 30
@ -413,7 +413,7 @@ The following attributes are **not sanitized** meaning: including them in your w
} }
``` ```
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"items": [ "items": [
{ {
@ -446,7 +446,7 @@ Autopaging would work like this:
* Get the **first 20** items from a feed with **id 12** * Get the **first 20** items from a feed with **id 12**
**GET /items**: **GET /items**:
```json ```jsonc
{ {
"batchSize": 20, "batchSize": 20,
"offset": 0, "offset": 0,
@ -460,7 +460,7 @@ The item with the lowest item id is 43.
* Get the next **20** items: **GET /items**: * Get the next **20** items: **GET /items**:
```json ```jsonc
{ {
"batchSize": 20, "batchSize": 20,
"offset": 43, "offset": 43,
@ -478,7 +478,7 @@ This is used to stay up to date.
* **Method**: GET * **Method**: GET
* **Route**: /items/updated * **Route**: /items/updated
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"lastModified": 123231, // returns only items with a lastModified timestamp >= than this one "lastModified": 123231, // returns only items with a lastModified timestamp >= than this one
// this may also return already existing items whose read or starred status // this may also return already existing items whose read or starred status
@ -488,7 +488,7 @@ This is used to stay up to date.
} }
``` ```
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"items": [ "items": [
{ {
@ -526,7 +526,7 @@ This is used to stay up to date.
* **Method**: PUT * **Method**: PUT
* **Route**: /items/read/multiple * **Route**: /items/read/multiple
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"items": [2, 3] // ids of the items "items": [2, 3] // ids of the items
} }
@ -547,7 +547,7 @@ This is used to stay up to date.
* **Method**: PUT * **Method**: PUT
* **Route**: /items/unread/multiple * **Route**: /items/unread/multiple
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"items": [2, 3] // ids of the items "items": [2, 3] // ids of the items
} }
@ -568,7 +568,7 @@ This is used to stay up to date.
* **Method**: PUT * **Method**: PUT
* **Route**: /items/star/multiple * **Route**: /items/star/multiple
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"items": [ "items": [
{ {
@ -594,7 +594,7 @@ This is used to stay up to date.
* **Method**: PUT * **Method**: PUT
* **Route**: /items/unstar/multiple * **Route**: /items/unstar/multiple
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"items": [ "items": [
{ {
@ -612,7 +612,7 @@ This is used to stay up to date.
* **Method**: PUT * **Method**: PUT
* **Route**: /items/read * **Route**: /items/read
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
// mark all items read lower than equal that id // 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 // this is mean to prevent marking items as read which the client/user does not yet know of
@ -657,7 +657,7 @@ This is used to clean up the database. It deletes folders and feeds that are mar
* **Route**: /feeds/all * **Route**: /feeds/all
* **Parameters**: none * **Parameters**: none
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"feeds": [ "feeds": [
{ {
@ -680,7 +680,7 @@ This is used to clean up the database. It deletes folders and feeds that are mar
* **Method**: GET * **Method**: GET
* **Route**: /feeds/update * **Route**: /feeds/update
* **Parameters**: * **Parameters**:
```json ```jsonc
{ {
"userId": "john", "userId": "john",
"feedId": 3 "feedId": 3
@ -716,7 +716,7 @@ This is used to clean up the database. It removes old read articles which are no
* **Route**: /version * **Route**: /version
* **Parameters**: none * **Parameters**: none
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"version": "5.2.3" "version": "5.2.3"
} }
@ -733,7 +733,7 @@ This API can be used to display warnings and errors in your client if the web ap
* **Route**: /status * **Route**: /status
* **Parameters**: none * **Parameters**: none
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"version": "5.2.4", "version": "5.2.4",
"warnings": { "warnings": {
@ -769,7 +769,7 @@ DEPRECATED: This API is deprecated, use the Nextcloud APIs instead.
* **Route**: /user * **Route**: /user
* **Parameters**: none * **Parameters**: none
* **Returns**: * **Returns**:
```json ```jsonc
{ {
"userId": "john", "userId": "john",
"displayName": "John Doe", "displayName": "John Doe",