1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Define the FreshRSS class

This commit is contained in:
J. King 2022-04-30 22:10:14 -04:00
parent 59358ec35b
commit a1a1463fcc
2 changed files with 35 additions and 3 deletions

View file

@ -20,12 +20,12 @@ class REST {
'strip' => '/index.php/apps/news/api', 'strip' => '/index.php/apps/news/api',
'class' => REST\NextcloudNews\Versions::class, '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/', 'match' => '/index.php/apps/news/api/v1-2/',
'strip' => '/index.php/apps/news/api/v1-2', 'strip' => '/index.php/apps/news/api/v1-2',
'class' => REST\NextcloudNews\V1_2::class, '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', 'match' => '/tt-rss/api',
'strip' => '/tt-rss/api', 'strip' => '/tt-rss/api',
'class' => REST\TinyTinyRSS\API::class, 'class' => REST\TinyTinyRSS\API::class,
@ -55,6 +55,11 @@ class REST {
'strip' => '', 'strip' => '',
'class' => REST\Miniflux\Status::class, '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: // Other candidates:
// Microsub https://indieweb.org/Microsub // Microsub https://indieweb.org/Microsub
// Google Reader http://feedhq.readthedocs.io/en/latest/api/index.html // 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 // Selfoss https://github.com/SSilence/selfoss/wiki/Restful-API-for-Apps-or-any-other-external-access
// NewsBlur http://www.newsblur.com/api // NewsBlur http://www.newsblur.com/api
// Unclear if clients exist: // 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 // BirdReader https://github.com/glynnbird/birdreader/blob/master/API.md
// Feedbin v1 https://github.com/feedbin/feedbin-api/commit/86da10aac5f1a57531a6e17b08744e5f9e7db8a9 // Feedbin v1 https://github.com/feedbin/feedbin-api/commit/86da10aac5f1a57531a6e17b08744e5f9e7db8a9
// Proprietary (centralized) entities: // Proprietary (centralized) entities:

27
lib/REST/FreshRSS/API.php Normal file
View file

@ -0,0 +1,27 @@
<?php
/** @license MIT
* Copyright 2017 J. King, Dustin Wilson et al.
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse\REST\FreshRSS;
use Laminas\Diactoros\Response;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
class API extends \JKingWeb\Arsse\REST\AbstractHandler {
protected const CALLS = [
'/accounts/ClientLogin' => [
'GET' => [],
'POST' => [],
],
];
public function __construct() {
}
public function dispatch(ServerRequestInterface $req): ResponseInterface {
return new Response();
}
}