You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
701 lines
15 KiB
701 lines
15 KiB
{ |
|
"openapi": "3.0.3", |
|
"info": { |
|
"title": "News", |
|
"version": "18.1.1", |
|
"description": "An RSS/Atom feed reader", |
|
"license": { |
|
"name": "agpl" |
|
} |
|
}, |
|
"servers": [ |
|
{ |
|
"url": "https://{hostname}:{port}/apps/news", |
|
"variables": { |
|
"hostname": { |
|
"default": "localhost" |
|
}, |
|
"port": { |
|
"default": "8080" |
|
} |
|
} |
|
} |
|
], |
|
"security": [ |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"components": { |
|
"securitySchemes": { |
|
"basic_auth": { |
|
"type": "http", |
|
"scheme": "basic" |
|
} |
|
}, |
|
"schemas": { |
|
"NewsListFeeds": { |
|
"type": "object", |
|
"properties": { |
|
"starredCount": { |
|
"type": "integer" |
|
}, |
|
"newestItemId": { |
|
"type": "integer" |
|
}, |
|
"feeds": { |
|
"type": "array", |
|
"items": { |
|
"$ref": "#/components/schemas/NewsFeed" |
|
} |
|
} |
|
} |
|
}, |
|
"NewsFeed": { |
|
"type": "object", |
|
"properties": { |
|
"id": { |
|
"type": "integer" |
|
}, |
|
"url": { |
|
"type": "string" |
|
}, |
|
"title": { |
|
"type": "string" |
|
}, |
|
"faviconLink": { |
|
"type": "string" |
|
}, |
|
"added": { |
|
"type": "integer" |
|
}, |
|
"folderId": { |
|
"type": "integer" |
|
}, |
|
"unreadCount": { |
|
"type": "integer" |
|
}, |
|
"ordering": { |
|
"type": "integer" |
|
}, |
|
"link": { |
|
"type": "string" |
|
}, |
|
"pinned": { |
|
"type": "boolean" |
|
}, |
|
"updateErrorCount": { |
|
"type": "integer" |
|
}, |
|
"lastUpdateError": { |
|
"type": "string" |
|
}, |
|
"items": { |
|
"type": "array", |
|
"items": { |
|
"$ref": "#/components/schemas/NewsArticle" |
|
} |
|
} |
|
} |
|
}, |
|
"NewsArticle": { |
|
"type": "object", |
|
"properties": { |
|
"id": { |
|
"type": "integer" |
|
}, |
|
"guid": { |
|
"type": "string" |
|
}, |
|
"guidHash": { |
|
"type": "string" |
|
}, |
|
"url": { |
|
"type": "string" |
|
}, |
|
"title": { |
|
"type": "string" |
|
}, |
|
"author": { |
|
"type": "string" |
|
}, |
|
"pubDate": { |
|
"type": "integer" |
|
}, |
|
"updatedDate": { |
|
"type": "integer" |
|
}, |
|
"body": { |
|
"type": "string" |
|
}, |
|
"enclosureMime": { |
|
"type": "string" |
|
}, |
|
"enclosureLink": { |
|
"type": "string" |
|
}, |
|
"mediaThumbnail": { |
|
"type": "string" |
|
}, |
|
"mediaDescription": { |
|
"type": "string" |
|
}, |
|
"feedId": { |
|
"type": "integer" |
|
}, |
|
"unread": { |
|
"type": "boolean" |
|
}, |
|
"starred": { |
|
"type": "boolean" |
|
}, |
|
"lastModified": { |
|
"type": "integer" |
|
}, |
|
"rtl": { |
|
"type": "boolean" |
|
}, |
|
"fingerprint": { |
|
"type": "string" |
|
}, |
|
"contentHash": { |
|
"type": "string" |
|
} |
|
} |
|
}, |
|
"NewsListArticles": { |
|
"type": "object", |
|
"properties": { |
|
"items": { |
|
"type": "array", |
|
"items": { |
|
"$ref": "#/components/schemas/NewsArticle" |
|
} |
|
} |
|
} |
|
}, |
|
"NewsListFolders": { |
|
"type": "object", |
|
"properties": { |
|
"folders": { |
|
"type": "array", |
|
"items": { |
|
"$ref": "#/components/schemas/NewsFolder" |
|
} |
|
} |
|
} |
|
}, |
|
"NewsFolder": { |
|
"type": "object", |
|
"properties": { |
|
"id": { |
|
"type": "integer" |
|
}, |
|
"name": { |
|
"type": "string" |
|
}, |
|
"opened": { |
|
"type": "boolean" |
|
}, |
|
"feeds": { |
|
"description": "This seems to be broken. In testing it is always empty", |
|
"deprecated": true, |
|
"type": "array", |
|
"items": { |
|
"$ref": "#/components/schemas/NewsFeed" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"paths": { |
|
"/api/v1-2/folders": { |
|
"get": { |
|
"operationId": "list-folders", |
|
"responses": { |
|
"200": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"$ref": "#/components/schemas/NewsListFolders" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"post": { |
|
"operationId": "create-folder", |
|
"parameters": [ |
|
{ |
|
"name": "name", |
|
"in": "query", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"$ref": "#/components/schemas/NewsListFolders" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/folders/{folderId}": { |
|
"parameters": [ |
|
{ |
|
"name": "folderId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "rename-folder", |
|
"parameters": [ |
|
{ |
|
"name": "name", |
|
"in": "query", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
}, |
|
"delete": { |
|
"operationId": "delete-folder", |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/folders/{folderId}/read": { |
|
"parameters": [ |
|
{ |
|
"name": "folderId", |
|
"in": "path", |
|
"description": "ID of the folder", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "mark-folder-as-read", |
|
"parameters": [ |
|
{ |
|
"name": "newestItemId", |
|
"in": "query", |
|
"description": "The newest read item", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/feeds": { |
|
"get": { |
|
"operationId": "list-feeds", |
|
"responses": { |
|
"200": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"$ref": "#/components/schemas/NewsListFeeds" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"post": { |
|
"operationId": "add-feed", |
|
"parameters": [ |
|
{ |
|
"name": "url", |
|
"in": "query", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "folderId", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"$ref": "#/components/schemas/NewsListFeeds" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/feeds/{feedId}": { |
|
"parameters": [ |
|
{ |
|
"name": "feedId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"delete": { |
|
"operationId": "delete-feed", |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/feeds/{feedId}/move": { |
|
"parameters": [ |
|
{ |
|
"name": "feedId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "move-feed", |
|
"parameters": [ |
|
{ |
|
"name": "folderId", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/feeds/{feedId}/rename": { |
|
"parameters": [ |
|
{ |
|
"name": "feedId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "rename-feed", |
|
"parameters": [ |
|
{ |
|
"name": "feedTitle", |
|
"in": "query", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/feeds/{feedId}/read": { |
|
"parameters": [ |
|
{ |
|
"name": "feedId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "mark-feed-as-read", |
|
"parameters": [ |
|
{ |
|
"name": "newestItemId", |
|
"in": "query", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/items": { |
|
"get": { |
|
"operationId": "list-articles", |
|
"parameters": [ |
|
{ |
|
"name": "type", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer", |
|
"default": 3 |
|
} |
|
}, |
|
{ |
|
"name": "id", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer", |
|
"default": 0 |
|
} |
|
}, |
|
{ |
|
"name": "getRead", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
}, |
|
{ |
|
"name": "batchSize", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer", |
|
"default": -1 |
|
} |
|
}, |
|
{ |
|
"name": "offset", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer", |
|
"default": 0 |
|
} |
|
}, |
|
{ |
|
"name": "oldestFirst", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "boolean", |
|
"default": false |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"$ref": "#/components/schemas/NewsListArticles" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/items/updated": { |
|
"get": { |
|
"operationId": "list-updated-articles", |
|
"parameters": [ |
|
{ |
|
"name": "type", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer", |
|
"default": 3 |
|
} |
|
}, |
|
{ |
|
"name": "id", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer", |
|
"default": 0 |
|
} |
|
}, |
|
{ |
|
"name": "lastModified", |
|
"in": "query", |
|
"required": false, |
|
"schema": { |
|
"type": "integer", |
|
"default": 0 |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"$ref": "#/components/schemas/NewsListArticles" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/items/{itemId}/read": { |
|
"parameters": [ |
|
{ |
|
"name": "itemId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "mark-article-as-read", |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/items/{itemId}/unread": { |
|
"parameters": [ |
|
{ |
|
"name": "itemId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "mark-article-as-unread", |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/items/{feedId}/{guidHash}/star": { |
|
"parameters": [ |
|
{ |
|
"name": "feedId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
}, |
|
{ |
|
"name": "guidHash", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "star-article", |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
}, |
|
"/api/v1-2/items/{feedId}/{guidHash}/unstar": { |
|
"parameters": [ |
|
{ |
|
"name": "feedId", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "integer" |
|
} |
|
}, |
|
{ |
|
"name": "guidHash", |
|
"in": "path", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
} |
|
], |
|
"put": { |
|
"operationId": "unstar-article", |
|
"responses": { |
|
"200": { |
|
"description": "" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}
|
|
|