Browse Source

Corect CamelCase references to Nextcloud

microsub
J. King 4 years ago
parent
commit
bbe70b6abc
  1. 14
      CHANGELOG
  2. 4
      dist/apache.conf
  3. 2
      dist/nginx.conf
  4. 2
      docs/en/010_About.md
  5. 6
      docs/en/020_Getting_Started/030_Web_Server_Configuration.md
  6. 6
      docs/en/030_Supported_Protocols/010_Nextcloud_News.md
  7. 2
      docs/en/030_Supported_Protocols/020_Tiny_Tiny_RSS.md
  8. 2
      docs/en/030_Supported_Protocols/index.md
  9. 4
      docs/en/040_Compatible_Clients.md
  10. 10
      lib/REST.php
  11. 4
      lib/REST/NextcloudNews/V1_2.php
  12. 2
      lib/REST/NextcloudNews/Versions.php
  13. 10
      sql/SQLite3/0.sql
  14. 6
      sql/SQLite3/2.sql
  15. 6
      tests/cases/REST/NextcloudNews/PDO/TestV1_2.php
  16. 6
      tests/cases/REST/NextcloudNews/TestV1_2.php
  17. 6
      tests/cases/REST/NextcloudNews/TestVersions.php
  18. 10
      tests/cases/REST/TestREST.php
  19. 6
      tests/phpunit.dist.xml

14
CHANGELOG

@ -99,11 +99,11 @@ Bug fixes:
- Print command-line error messages more sensibly
- Allow exporting default configuration to standard output
- Fail correctly on authentication failure
- Prefer JSON data over GET parameters in NextCloud News
- Prefer JSON data over GET parameters in Nextcloud News
Changes:
- Simplify user management backend to minimize opportunity for bugs
- Document previously unknown NextCloud News behaviour
- Document previously unknown Nextcloud News behaviour
Version 0.4.0 (2018-10-26)
==========================
@ -120,7 +120,7 @@ Bug fixes:
- Minor fixes to code and documentation
Changes:
- Disable memory and time limits to avoid deadlocks with NextCloud News
- Disable memory and time limits to avoid deadlocks with Nextcloud News
Version 0.3.0 (2018-01-12)
==========================
@ -146,7 +146,7 @@ Bug fixes:
- Rename feeds correctly via TTRSS protocol
- Toggle marks correctly via TTRSS protocol
- Sort everything case-insensitively
- Be even stricter about output data types in NextCloud News
- Be even stricter about output data types in Nextcloud News
Changes:
- Do not omit read feeds from TTRSS' getCounters, to fix some clients
@ -160,8 +160,8 @@ New features:
Bug fixes:
- Perform feed discovery *correctly*
- Expose the incorrectDbCharset boolean in the NextCloud News server status
- Give NextCloud News articles' guidHash attribute the correct type (string)
- Expose the incorrectDbCharset boolean in the Nextcloud News server status
- Give Nextcloud News articles' guidHash attribute the correct type (string)
Changes:
- Overhaul input type normalization to minimize bug opportunities
@ -170,7 +170,7 @@ Version 0.1.1 (2017-09-30)
==========================
Bug fixes:
- Perform feed discovery like NextCloud News does
- Perform feed discovery like Nextcloud News does
- Respond correctly to HEAD requests
- Various minor fixes

4
dist/apache.conf

@ -10,12 +10,12 @@
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/usr/share/arsse/arsse.php"
ProxyPreserveHost On
# NextCloud News v1.2, Tiny Tiny RSS API, TT-RSS newsfeed icons
# Nextcloud News v1.2, Tiny Tiny RSS API, TT-RSS newsfeed icons
<LocationMatch "(/index\.php/apps/news/api/?.+|/tt-rss/(api|feed-icons))">
ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse"
</LocationMatch>
# NextCloud News API detection, Fever API
# Nextcloud News API detection, Fever API
<LocationMatch "(/index\.php/apps/news/api/?$|/fever)">
# these locations should not be behind HTTP authentication
ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse"

2
dist/nginx.conf

@ -23,7 +23,7 @@ server {
fastcgi_param REMOTE_USER $remote_user;
}
# NextCloud News protocol
# Nextcloud News protocol
location /index.php/apps/news/api {
try_files $uri @arsse;

2
docs/en/010_About.md

@ -1,6 +1,6 @@
The Advanced RSS Environment (affectionately called "The Arsse") is a news aggregator server which implements multiple synchronization protocols. Unlike most other aggregator servers, The Arsse does not include a Web front-end (though one is planned as a separate project), and it relies on [existing protocols](Supported_Protocols) to maximize compatibility with [existing clients](Compatible_Clients). Supported protocols are:
- NextCloud News
- Nextcloud News
- Tiny Tiny RSS
- Fever

6
docs/en/020_Getting_Started/030_Web_Server_Configuration.md

@ -34,7 +34,7 @@ server {
fastcgi_param REMOTE_USER $remote_user;
}
# NextCloud News protocol
# Nextcloud News protocol
location /index.php/apps/news/api {
try_files $uri @arsse;
@ -92,12 +92,12 @@ Afterward the follow virtual host configuration should work, after modifying pat
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/usr/share/arsse/arsse.php"
ProxyPreserveHost On
# NextCloud News v1.2, Tiny Tiny RSS API, TT-RSS newsfeed icons
# Nextcloud News v1.2, Tiny Tiny RSS API, TT-RSS newsfeed icons
<LocationMatch "(/index\.php/apps/news/api/?.+|/tt-rss/(api|feed-icons))">
ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse"
</LocationMatch>
# NextCloud News API detection, Fever API
# Nextcloud News API detection, Fever API
<LocationMatch "(/index\.php/apps/news/api/?$|/fever)">
# these locations should not be behind HTTP authentication
ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse"

6
docs/en/030_Supported_Protocols/010_NextCloud_News.md → docs/en/030_Supported_Protocols/010_Nextcloud_News.md

@ -13,7 +13,7 @@
<dd><a href="https://github.com/nextcloud/news/blob/master/docs/externalapi/Legacy.md">Version 1.2</a></dd>
</dl>
The NextCloud News protocol was the first supported by The Arsse, and has been supported in full since version 0.3.0.
The Nextcloud News protocol was the first supported by The Arsse, and has been supported in full since version 0.3.0.
It allows organizing newsfeeds into single-level folders, and supports a wide range of operations on newsfeeds, folders, and articles.
@ -25,7 +25,7 @@ It allows organizing newsfeeds into single-level folders, and supports a wide ra
- The feed updater ignores the `userId` parameter: feeds in The Arsse are deduplicated, and have no owner
- The `/feeds/all` route lists only feeds which should be checked for updates, and it also returns all `userId` attributes as empty strings: feeds in The Arsse are deduplicated, and have no owner
- The API's "updater" routes do not require administrator priviledges as The Arsse has no concept of user classes
- The "updater" console commands mentioned in the protocol specification are not implemented, as The Arsse does not implement the required NextCloud subsystems
- The "updater" console commands mentioned in the protocol specification are not implemented, as The Arsse does not implement the required Nextcloud subsystems
- The `lastLoginTimestamp` attribute of the user metadata is always the current time: The Arsse's implementation of the protocol is fully stateless
- Syntactically invalid JSON input will yield a `400 Bad Request` response instead of falling back to GET parameters
- Folder names consisting only of whitespace are rejected along with the empty string
@ -36,4 +36,4 @@ It allows organizing newsfeeds into single-level folders, and supports a wide ra
# Interaction with nested folders
Tiny Tiny RSS is unique in allowing newsfeeds to be grouped into folders nested to arbitrary depth. When newsfeeds are placed into nested folders, they simply appear in the top-level folder when accessed via the NextCloud News protocol.
Tiny Tiny RSS is unique in allowing newsfeeds to be grouped into folders nested to arbitrary depth. When newsfeeds are placed into nested folders, they simply appear in the top-level folder when accessed via the Nextcloud News protocol.

2
docs/en/030_Supported_Protocols/020_Tiny_Tiny_RSS.md

@ -59,7 +59,7 @@ The Arsse does not currently support the entire protocol. Notably missing featur
# Interaction with HTTP authentication
Tiny Tiny RSS itself is unaware of HTTP authentication: if HTTP authentication is used in the server configuration, it has no effect on authentication in the API. The Arsse, however, makes use of HTTP authentication for NextCloud News, and can do so for TT-RSS as well. In a default configuration The Arsse functions in the same way as TT-RSS: HTTP authentication and API authentication are completely separate and independent. Alternative behaviour is summarized below:
Tiny Tiny RSS itself is unaware of HTTP authentication: if HTTP authentication is used in the server configuration, it has no effect on authentication in the API. The Arsse, however, makes use of HTTP authentication for Nextcloud News, and can do so for TT-RSS as well. In a default configuration The Arsse functions in the same way as TT-RSS: HTTP authentication and API authentication are completely separate and independent. Alternative behaviour is summarized below:
- With default settings:
- Clients may optionally provide HTTP credentials

2
docs/en/030_Supported_Protocols/index.md

@ -1,6 +1,6 @@
The Arsse was designed from the start as a server for multiple synchronization protocols which clients can make use of. Currently the following protocols are supported:
- [NextCloud News](NextCloud_News)
- [Nextcloud News](Nextcloud_News)
- [Tiny Tiny RSS](Tiny_Tiny_RSS)
- [Fever](Fever)

4
docs/en/040_Compatible_Clients.md

@ -127,13 +127,13 @@ The Arsse does not at this time have any first party clients. However, because T
</td>
</tr>
<tr>
<td><a href="https://github.com/nextcloud/news-android/">NextCloud News</a></td>
<td><a href="https://github.com/nextcloud/news-android/">Nextcloud News</a></td>
<td>Android</td>
<td class="Y"></td>
<td class="N"></td>
<td class="N"></td>
<td>
<p>Official Android client for NextCloud News.</p>
<p>Official Android client for Nextcloud News.</p>
</td>
</tr>
<tr>

10
lib/REST.php

@ -16,15 +16,15 @@ use Zend\Diactoros\Response\EmptyResponse;
class REST {
const API_LIST = [
'ncn' => [ // NextCloud News version enumerator
'ncn' => [ // Nextcloud News version enumerator
'match' => '/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/externalapi/Legacy.md
'match' => '/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
'match' => '/tt-rss/api',
@ -50,7 +50,7 @@ class REST {
// NewsBlur http://www.newsblur.com/api
// Unclear if clients exist:
// Miniflux https://docs.miniflux.app/en/latest/api.html#api-reference
// 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/externalapi/External-Api.md
// BirdReader https://github.com/glynnbird/birdreader/blob/master/API.md
// Feedbin v1 https://github.com/feedbin/feedbin-api/commit/86da10aac5f1a57531a6e17b08744e5f9e7db8a9
// Proprietary (centralized) entities:

4
lib/REST/NextCloudNews/V1_2.php → lib/REST/NextcloudNews/V1_2.php

@ -4,7 +4,7 @@
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse\REST\NextCloudNews;
namespace JKingWeb\Arsse\REST\NextcloudNews;
use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Service;
@ -22,7 +22,7 @@ use Zend\Diactoros\Response\JsonResponse as Response;
use Zend\Diactoros\Response\EmptyResponse;
class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler {
const REALM = "NextCloud News API v1-2";
const REALM = "Nextcloud News API v1-2";
const VERSION = "11.0.5";
const ACCEPTED_TYPE = "application/json";

2
lib/REST/NextCloudNews/Versions.php → lib/REST/NextcloudNews/Versions.php

@ -4,7 +4,7 @@
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse\REST\NextCloudNews;
namespace JKingWeb\Arsse\REST\NextcloudNews;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;

10
sql/SQLite3/0.sql

@ -28,7 +28,7 @@ create table arsse_users_meta(
);
create table arsse_folders(
-- folders, used by NextCloud News and Tiny Tiny RSS
-- folders, used by Nextcloud News and Tiny Tiny RSS
-- feed subscriptions may belong to at most one folder;
-- in Tiny Tiny RSS folders may nest
id integer primary key, -- sequence number
@ -69,9 +69,9 @@ create table arsse_subscriptions(
added text not null default CURRENT_TIMESTAMP, -- time at which feed was added
modified text not null default CURRENT_TIMESTAMP, -- time at which subscription properties were last modified
title text, -- user-supplied title
order_type int not null default 0, -- NextCloud sort order
order_type int not null default 0, -- Nextcloud sort order
pinned boolean not null default 0, -- whether feed is pinned (always sorts at top)
folder integer references arsse_folders(id) on delete cascade, -- TT-RSS category (nestable); the first-level category (which acts as NextCloud folder) is joined in when needed
folder integer references arsse_folders(id) on delete cascade, -- TT-RSS category (nestable); the first-level category (which acts as Nextcloud folder) is joined in when needed
unique(owner,feed) -- a given feed should only appear once for a given owner
);
@ -109,9 +109,9 @@ create table arsse_marks(
);
create table arsse_editions(
-- IDs for specific editions of articles (required for at least NextCloud News)
-- IDs for specific editions of articles (required for at least Nextcloud News)
-- every time an article is updated by its author, a new unique edition number is assigned
-- with NextCloud News this prevents users from marking as read an article which has been
-- with Nextcloud News this prevents users from marking as read an article which has been
-- updated since the client state was last refreshed
id integer primary key, -- sequence number
article integer not null references arsse_articles(id) on delete cascade, -- the article of which this is an edition

6
sql/SQLite3/2.sql

@ -20,7 +20,7 @@ drop table arsse_users;
alter table arsse_users_new rename to arsse_users;
create table arsse_folders_new(
-- folders, used by NextCloud News and Tiny Tiny RSS
-- folders, used by Nextcloud News and Tiny Tiny RSS
-- feed subscriptions may belong to at most one folder;
-- in Tiny Tiny RSS folders may nest
id integer primary key, -- sequence number
@ -67,9 +67,9 @@ create table arsse_subscriptions_new(
added text not null default CURRENT_TIMESTAMP, -- time at which feed was added
modified text not null default CURRENT_TIMESTAMP, -- time at which subscription properties were last modified
title text collate nocase, -- user-supplied title
order_type int not null default 0, -- NextCloud sort order
order_type int not null default 0, -- Nextcloud sort order
pinned boolean not null default 0, -- whether feed is pinned (always sorts at top)
folder integer references arsse_folders(id) on delete cascade, -- TT-RSS category (nestable); the first-level category (which acts as NextCloud folder) is joined in when needed
folder integer references arsse_folders(id) on delete cascade, -- TT-RSS category (nestable); the first-level category (which acts as Nextcloud folder) is joined in when needed
unique(owner,feed) -- a given feed should only appear once for a given owner
);
insert into arsse_subscriptions_new select * from arsse_subscriptions;

6
tests/cases/REST/NextCloudNews/PDO/TestV1_2.php → tests/cases/REST/NextcloudNews/PDO/TestV1_2.php

@ -4,11 +4,11 @@
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse\TestCase\REST\NextCloudNews\PDO;
namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews\PDO;
/** @covers \JKingWeb\Arsse\REST\NextCloudNews\V1_2<extended>
/** @covers \JKingWeb\Arsse\REST\NextcloudNews\V1_2<extended>
* @group optional
*/
class TestV1_2 extends \JKingWeb\Arsse\TestCase\REST\NextCloudNews\TestV1_2 {
class TestV1_2 extends \JKingWeb\Arsse\TestCase\REST\NextcloudNews\TestV1_2 {
use \JKingWeb\Arsse\Test\PDOTest;
}

6
tests/cases/REST/NextCloudNews/TestV1_2.php → tests/cases/REST/NextcloudNews/TestV1_2.php

@ -4,7 +4,7 @@
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse\TestCase\REST\NextCloudNews;
namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews;
use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\User;
@ -14,13 +14,13 @@ use JKingWeb\Arsse\Misc\Date;
use JKingWeb\Arsse\Context\Context;
use JKingWeb\Arsse\Db\ExceptionInput;
use JKingWeb\Arsse\Db\Transaction;
use JKingWeb\Arsse\REST\NextCloudNews\V1_2;
use JKingWeb\Arsse\REST\NextcloudNews\V1_2;
use Psr\Http\Message\ResponseInterface;
use Zend\Diactoros\ServerRequest;
use Zend\Diactoros\Response\JsonResponse as Response;
use Zend\Diactoros\Response\EmptyResponse;
/** @covers \JKingWeb\Arsse\REST\NextCloudNews\V1_2<extended> */
/** @covers \JKingWeb\Arsse\REST\NextcloudNews\V1_2<extended> */
class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest {
protected $h;
protected $feeds = [ // expected sample output of a feed list from the database, and the resultant expected transformation by the REST handler

6
tests/cases/REST/NextCloudNews/TestVersions.php → tests/cases/REST/NextcloudNews/TestVersions.php

@ -4,15 +4,15 @@
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse\TestCase\REST\NextCloudNews;
namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews;
use JKingWeb\Arsse\REST\NextCloudNews\Versions;
use JKingWeb\Arsse\REST\NextcloudNews\Versions;
use Psr\Http\Message\ResponseInterface;
use Zend\Diactoros\ServerRequest;
use Zend\Diactoros\Response\JsonResponse as Response;
use Zend\Diactoros\Response\EmptyResponse;
/** @covers \JKingWeb\Arsse\REST\NextCloudNews\Versions */
/** @covers \JKingWeb\Arsse\REST\NextcloudNews\Versions */
class TestVersions extends \JKingWeb\Arsse\Test\AbstractTest {
public function setUp() {
self::clearData();

10
tests/cases/REST/TestREST.php

@ -11,7 +11,7 @@ use JKingWeb\Arsse\User;
use JKingWeb\Arsse\REST;
use JKingWeb\Arsse\REST\Handler;
use JKingWeb\Arsse\REST\Exception501;
use JKingWeb\Arsse\REST\NextCloudNews\V1_2 as NCN;
use JKingWeb\Arsse\REST\NextcloudNews\V1_2 as NCN;
use JKingWeb\Arsse\REST\TinyTinyRSS\API as TTRSS;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
@ -41,10 +41,10 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest {
'unstripped' => ['match' => "/full/url", 'strip' => "", 'class' => "UnstrippedProtocol"],
];
return [
[$real, "/index.php/apps/news/api/v1-2/feeds", ["ncn_v1-2", "/feeds", \JKingWeb\Arsse\REST\NextCloudNews\V1_2::class]],
[$real, "/index.php/apps/news/api/v1-2", ["ncn", "/v1-2", \JKingWeb\Arsse\REST\NextCloudNews\Versions::class]],
[$real, "/index.php/apps/news/api/", ["ncn", "/", \JKingWeb\Arsse\REST\NextCloudNews\Versions::class]],
[$real, "/index%2Ephp/apps/news/api/", ["ncn", "/", \JKingWeb\Arsse\REST\NextCloudNews\Versions::class]],
[$real, "/index.php/apps/news/api/v1-2/feeds", ["ncn_v1-2", "/feeds", \JKingWeb\Arsse\REST\NextcloudNews\V1_2::class]],
[$real, "/index.php/apps/news/api/v1-2", ["ncn", "/v1-2", \JKingWeb\Arsse\REST\NextcloudNews\Versions::class]],
[$real, "/index.php/apps/news/api/", ["ncn", "/", \JKingWeb\Arsse\REST\NextcloudNews\Versions::class]],
[$real, "/index%2Ephp/apps/news/api/", ["ncn", "/", \JKingWeb\Arsse\REST\NextcloudNews\Versions::class]],
[$real, "/index.php/apps/news/", []],
[$real, "/index!php/apps/news/api/", []],
[$real, "/tt-rss/api/index.php", ["ttrss_api", "/index.php", \JKingWeb\Arsse\REST\TinyTinyRSS\API::class]],

6
tests/phpunit.dist.xml

@ -112,9 +112,9 @@
<file>cases/REST/TestREST.php</file>
</testsuite>
<testsuite name="NCNv1">
<file>cases/REST/NextCloudNews/TestVersions.php</file>
<file>cases/REST/NextCloudNews/TestV1_2.php</file>
<file>cases/REST/NextCloudNews/PDO/TestV1_2.php</file>
<file>cases/REST/NextcloudNews/TestVersions.php</file>
<file>cases/REST/NextcloudNews/TestV1_2.php</file>
<file>cases/REST/NextcloudNews/PDO/TestV1_2.php</file>
</testsuite>
<testsuite name="TTRSS">
<file>cases/REST/TinyTinyRSS/TestSearch.php</file>

Loading…
Cancel
Save