From a1a1463fcc7875206a2f4ceffaf4a4d39129eec6 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 30 Apr 2022 22:10:14 -0400 Subject: [PATCH] Define the FreshRSS class --- lib/REST.php | 11 ++++++++--- lib/REST/FreshRSS/API.php | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 lib/REST/FreshRSS/API.php diff --git a/lib/REST.php b/lib/REST.php index f7818e5..e548352 100644 --- a/lib/REST.php +++ b/lib/REST.php @@ -20,12 +20,12 @@ class REST { 'strip' => '/index.php/apps/news/api', 'class' => REST\NextcloudNews\Versions::class, ], - 'ncn_v1-2' => [ // Nextcloud News v1-2 https://github.com/nextcloud/news/blob/master/docs/externalapi/Legacy.md + 'ncn_v1-2' => [ // Nextcloud News v1-2 https://github.com/nextcloud/news/blob/master/docs/api/api-v1-2.md 'match' => '/index.php/apps/news/api/v1-2/', 'strip' => '/index.php/apps/news/api/v1-2', 'class' => REST\NextcloudNews\V1_2::class, ], - 'ttrss_api' => [ // Tiny Tiny RSS https://git.tt-rss.org/git/tt-rss/wiki/ApiReference + 'ttrss_api' => [ // Tiny Tiny RSS https://tt-rss.org/wiki/ApiReference 'match' => '/tt-rss/api', 'strip' => '/tt-rss/api', 'class' => REST\TinyTinyRSS\API::class, @@ -55,6 +55,11 @@ class REST { 'strip' => '', 'class' => REST\Miniflux\Status::class, ], + 'freshrss' => [ // Google Reader as implemented by FreshRSS + 'match' => "/api/greader.php/reader/api/0/", + 'strip' => "/api/greader.php/reader/api/0", + 'class' => REST\FreshRSS\API::class, + ], // Other candidates: // Microsub https://indieweb.org/Microsub // Google Reader http://feedhq.readthedocs.io/en/latest/api/index.html @@ -63,7 +68,7 @@ class REST { // Selfoss https://github.com/SSilence/selfoss/wiki/Restful-API-for-Apps-or-any-other-external-access // NewsBlur http://www.newsblur.com/api // Unclear if clients exist: - // Nextcloud News v2 https://github.com/nextcloud/news/blob/master/docs/externalapi/External-Api.md + // Nextcloud News v2 https://github.com/nextcloud/news/blob/master/docs/api/api-v2.md // BirdReader https://github.com/glynnbird/birdreader/blob/master/API.md // Feedbin v1 https://github.com/feedbin/feedbin-api/commit/86da10aac5f1a57531a6e17b08744e5f9e7db8a9 // Proprietary (centralized) entities: diff --git a/lib/REST/FreshRSS/API.php b/lib/REST/FreshRSS/API.php new file mode 100644 index 0000000..87cc0b2 --- /dev/null +++ b/lib/REST/FreshRSS/API.php @@ -0,0 +1,27 @@ + [ + 'GET' => [], + 'POST' => [], + ], + ]; + + public function __construct() { + } + + public function dispatch(ServerRequestInterface $req): ResponseInterface { + return new Response(); + } +} \ No newline at end of file