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

277 commits

Author SHA1 Message Date
J. King
8ad7fc81a8 Initially mapping out of Miniflux API 2020-10-31 21:26:11 -04:00
J. King
0117e7f9bf Relax Fever's HTTP correctness for client compat
- Unread on iOS appears to send all API requests as GETs
- Newsflash on Linux sends multipart/form-data input
2020-10-27 10:49:54 -04:00
J. King
e60f7ea03f Add class constant visibility 2020-03-01 18:32:01 -05:00
J. King
bc53a2d24a Style fixes 2020-03-01 15:16:50 -05:00
J. King
bbace7a0ac Use void and nullable return types where practical 2020-01-20 13:34:03 -05:00
J. King
5838af892f Replace references to Zend with Laminas 2020-01-20 10:40:05 -05:00
J. King
c4ee7254cd Refactor some tests to use data providers 2020-01-08 12:02:43 -05:00
J. King
bbe70b6abc Corect CamelCase references to Nextcloud 2019-12-05 13:02:02 -05:00
J. King
5df89009e6 Merge branch 'master' of https://code.mensbeam.com/MensBeam/arsse 2019-12-02 19:09:16 -05:00
J. King
728eecfbb5 Additional service tests 2019-10-19 12:14:13 -04:00
J. King
64c3ec3571 Coverage fixes and OPML bugfix 2019-10-17 13:00:56 -04:00
J. King
4f5a8e3180 Make media type checking more robust 2019-09-27 22:38:03 -04:00
J. King
53aa7a4d0d Style fixes 2019-09-05 10:21:36 -04:00
J. King
d9c769d40e Remove Target class 2019-09-05 10:19:05 -04:00
J. King
29667464a1 Remove unnecessary namespace imports 2019-09-05 10:03:32 -04:00
J. King
137be8bde2 Fix whitespace 2019-07-26 23:24:29 -04:00
J. King
45a43488ee Increase compatibility with misbehaving Fever clients 2019-07-26 23:23:22 -04:00
J. King
2aa16f3405 Merge branch 'fever' into opml 2019-07-24 14:04:04 -04:00
J. King
61b942df70 Defer Fever favicons to a future release 2019-07-24 12:27:50 -04:00
J. King
0480465e7e Test Fever XML responses
Fixes #158
2019-07-24 09:10:13 -04:00
J. King
6ef13d0880 Style fixes 2019-05-01 22:52:20 -04:00
J. King
3899ee6b4e Allow for replacing label and tag associations
This supplements adding and removing
2019-04-27 18:32:15 -04:00
J. King
2d18be959c Tests for undoing read marks 2019-04-10 18:27:57 -04:00
J. King
c55a960b85 Slight cleanup 2019-04-10 15:14:45 -04:00
J. King
8532c581a8 Handle OPTIONS requests in Fever 2019-04-10 10:51:02 -04:00
J. King
afb95e53b0 Initial implementation of read-undo 2019-04-10 10:21:14 -04:00
J. King
52bc5fbda6 Tests for simple marking 2019-04-10 09:48:28 -04:00
J. King
15915a4393 Initial implementation of simple marks 2019-04-08 23:31:22 -04:00
J. King
c783ec4357 Prototype XML output for Fever 2019-04-08 20:58:45 -04:00
J. King
98fc3f4940 Test for hot links 2019-04-08 19:21:21 -04:00
J. King
4ce371ece6 Tests and fixes for Fever item listing 2019-04-08 18:41:56 -04:00
J. King
e3d2215920 Style fixes 2019-04-05 11:03:15 -04:00
J. King
0ef606aa03 Return string list of item IDs 2019-04-05 08:20:05 -04:00
J. King
0752e9cf3d Implement Fever sync 2019-04-04 19:37:48 -04:00
J. King
c6d241e653 Implement Fever item list 2019-04-04 17:57:12 -04:00
J. King
f72c85c9f6 Hopefully working but maybe broken custom sorting 2019-04-04 11:22:50 -04:00
J. King
5d994f3dad Normalize Fever input consistently
Two parameters are undocumented, but other implementations consistently
accept them from clients
2019-03-28 14:54:31 -04:00
J. King
de615c671a Tests and fixed for Fever feeds and groups 2019-03-27 15:09:04 -04:00
J. King
7faec3b0db Fever fixes
- Ensure the last refresh time is included in authenticated requests
- Use a partial mock in auth tests so that other processing does not
get in the way of results
- Make sure the group list includes unused groups
- Make sure the update time of subscriptions is correct
2019-03-27 11:54:47 -04:00
J. King
acb3973149 Prototype implementation of Fever groups and feeds 2019-03-26 08:53:26 -04:00
J. King
bf3bf9589f Merge branch 'master' into fever 2019-03-25 14:12:08 -04:00
J. King
65f723c7d4 Fix missing reference to author in TT-RSS. 2019-03-25 11:30:35 -04:00
J. King
22c2629078 Partial tests for new CLI features 2019-03-25 10:45:05 -04:00
J. King
7d95e8fc09 Split Fever user management from protocol handler 2019-03-25 08:31:49 -04:00
J. King
1ce95ef4d9 Add means of testing Fever authentication 2019-03-24 15:05:21 -04:00
J. King
07122b524a Rename Fever user functions for consistency 2019-03-21 10:19:30 -04:00
J. King
9ebaa20633 Tests for Fever password creation and removal 2019-03-20 22:24:35 -04:00
J. King
9168155244 Add method to unset a Fever password 2019-03-20 10:42:04 -04:00
J. King
1e2d595992 Full set of authentication tests for Fever 2019-03-19 23:37:08 -04:00
J. King
d59223bbcb First authentication test for Fever 2019-03-18 22:49:47 -04:00
J. King
3aa2b62d02 Basic Fever skeleton
Authentication should work, but not tests have been written yet
2019-03-09 22:44:59 -05:00
J. King
3b8461b1ca Add searching to TTRSS handler 2019-02-28 16:22:04 -05:00
J. King
85307bc90a Add parser for TTRSS search strings 2019-02-28 15:31:33 -05:00
J. King
b950ac066f Restrict options in not-context and hopefully make it easier to use 2019-02-25 22:41:12 -05:00
J. King
5cd84c4ab4 Validate configuration parameters on import, and other changes
- Each parameter is checked for type and normalized
- Interval strings are converted to DateInterval objects
- Timeouts can be specified as interval strings
- Most intervals can be null to signify infinity
- Driver classes are checked that they implement the correct interface
- Short driver names may be used, and are used by default
- Helpful errors messages are printed in case of erroneous configuration

Exporting is currently broken; this will be fixed in an upcoming commit
2019-01-20 22:40:49 -05:00
J. King
81acba90dc Use strict equality when comparing strings 2019-01-11 10:38:06 -05:00
J. King
cf896121b2 Style fixes 2018-12-05 17:28:11 -05:00
J. King
51755a2ce6 Retire article field groups 2018-12-05 16:55:14 -05:00
J. King
3b3b810f10 Replicate some unspecified NCNv1 behaviour, and document the rest
See #139 for list

Closes #139
Closes #140
Closes #141
2018-11-07 13:01:46 -05:00
J. King
27edcddc9b Simplify NCNv1 userStatus call 2018-10-28 13:59:09 -04:00
J. King
11747c93fd Strip out unused user management functionality
Tests have been removed as well; new tests are forthcoming
2018-10-28 10:59:17 -04:00
J. King
f64f0c6a22 Whitespace cleanup 2018-10-26 14:58:04 -04:00
J. King
1aa556cf12 Add HTTP authentication support to TTRSS; fixes #133
Also bump version to 0.4.0
2018-10-26 14:40:20 -04:00
J. King
cbc9491f75 CS fixes and version bump 2018-01-12 09:48:33 -05:00
J. King
34b508171b Merge CORS branch 2018-01-12 09:41:13 -05:00
J. King
aa57227097 Use PSR-7 for authentication; fixes #53 2018-01-11 15:48:29 -05:00
J. King
3fa2d38f31 Initial rewrite of REST class; needs more testing, but should be functional
- improves #53
- improves #66
2018-01-06 12:02:45 -05:00
J. King
890f9b07d4 Replace Resquest objects with PSR-7 request messages; improves #53 2018-01-04 23:08:53 -05:00
J. King
9ad0b47201 Add Target class to manipulate request traget URL parts
The query part is not parsed for now because PSR-7 request objects/PHP take care of that parsing for us.
2018-01-04 14:06:45 -05:00
J. King
9eadd602bd Replace Response objects with PSR-7 response messages; improves #53
While the test suite passes, this commit yields a broken server: replacing ad hoc request objectss with PSR-7 ones is still required, as is emission of PSR-7 responses. Both will come in subsequent commits, with tests

Diactoros was chosen specifically because it includes facilities for emitting responses, something which is awkward to test. The end of this refactoring should see both the Response and Request classes disappear, and the general REST class fully covered (as well as any speculative additions to AbstractHanlder).
2018-01-03 23:13:08 -05:00
J. King
77793f95cb Controller fixes for PDO databases; fixes #72 2017-12-31 17:24:40 -05:00
J. King
79f9808f1f CS fixes 2017-12-07 15:18:25 -05:00
J. King
84bd624e94 Properly fix getCounters 2017-12-06 19:16:35 -05:00
J. King
af42bceac0 Do not omit zero-unread items in TTRSS getCounter operation
Though TTRSS itself (usually) omits items that have a counter of zero, at least one client takes this to mean the last-seen counter is unchanged, rather than zero.
2017-12-06 15:50:40 -05:00
J. King
adece521a9 TTRSS: Correct mark toggling; fixes #132 2017-12-01 22:13:27 -05:00
J. King
9ac2421fe3 TTRSS: accept base64 passwords; fixes #130 2017-11-30 19:31:40 -05:00
J. King
3ffcd6dd97 Make TTRSS handler reject erroneous paths 2017-11-30 17:54:56 -05:00
J. King
a404d4d108 NCNv1: Be explicit about types; fixes #129
This is actually mandated by the specification: a change in data type requires a protocol version number change
2017-11-30 14:47:39 -05:00
J. King
4d4e8e3580 TTRSS: correct feed renaming; fixes #128 2017-11-30 12:49:23 -05:00
J. King
22cdc8916d Documentation tweaks and CS fixes 2017-11-29 22:42:50 -05:00
J. King
5cd7268c0a Added incorrectDbCharset to NCNv1 server status
This has been exposed since version 11.0.3, released before our version 0.1.0, but after implementation work had begun
2017-11-29 18:14:59 -05:00
J. King
40944a9b58 Merge remote-tracking branch 'remotes/origin/ttrss' 2017-11-29 16:05:23 -05:00
J. King
3d958547a5 Implement OPTIONS requests for NCNv1; fixes #107 2017-11-29 15:28:33 -05:00
J. King
e1f1c8b859 Refactoring 2017-11-29 13:41:26 -05:00
J. King
2bbc83aeb0 Tweak 2017-11-29 12:15:37 -05:00
J. King
40e9b7f986 Changed all TTRSS outputs to match original types exactly; improves #125 2017-11-29 11:47:10 -05:00
J. King
b4890eaced Make TTRSS tests consider data types; improves #125 2017-11-29 09:22:59 -05:00
J. King
b242c70968 Refactor of NCNv1 in anticipation of OPTIONS requests 2017-11-28 13:46:07 -05:00
J. King
999f255203 Fixes for bugs uncovered during client testing 2017-11-27 13:05:08 -05:00
J. King
05620602bf Tweak 2017-11-23 18:12:18 -05:00
J. King
b820a004d6 Complete testing of TTRSS handler
Also implemented OPTIONS handling for TTRSS; improves #107
2017-11-23 18:07:56 -05:00
J. King
c669273792 Implement TTRSS operation getHeadlines; fixe #82 2017-11-22 20:18:16 -05:00
J. King
e729cedeca Make getCompactHeadlines use a whitelist instead 2017-11-20 09:49:47 -05:00
J. King
5c140aedc4 Implement TTRSS operation getCompactHeadlines; fixes #95
This commit also implements the back-end for the standard getHeadlines operation and handles all special feeds and categories; fixes #119
2017-11-20 00:09:20 -05:00
J. King
b595815eb9 Change NCNv1 handler to use new "typical" articleList fieldset 2017-11-17 18:12:00 -05:00
J. King
c88b5c4f18 Make distinction between modified and marked for articles
Also added various sets of fields to include when listing articles.
2017-11-17 17:52:00 -05:00
J. King
6da86428c4 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:51:03 -05:00
J. King
11b2066922 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:23:18 -05:00
J. King
6c8598d897 Implement contexts for non-recursive folders, and any/no label
Adjusted TTRSS handler accordingly
2017-11-16 15:56:14 -05:00
J. King
de92fb514b Implement TTRSS opera getArticle; fixes #84 2017-11-15 15:38:49 -05:00
J. King
ea08bbb87b Implement TTRSS feed icons; fixes #121
This introduces a data model function of unusual privilege: it can retrieve favicon URLs for any subscription, regardless of user ID. This is a single-purpose hack and its use should be avoided if at all possible.
2017-11-10 12:02:59 -05:00
J. King
ea986f5032 Implement TTRSS operation updateArticle; fixes #83
This required adding the "notes" column to the arsse_marks table and adding same as a target value in Database::articleMark()

The Context class was also adjusted to remove the possibility of false positives in some tests
2017-11-09 14:21:12 -05:00
J. King
c6cd8b8aaa Removing request chunking from NCN controller 2017-11-07 10:00:31 -05:00
J. King
9c9c34f7fe Implement TTRSS operation getFeeds; fixes #80 2017-11-02 17:17:46 -04:00
J. King
fff6082e3c Adjust TTRSS catchupFeed to use shallow subscription listing 2017-10-31 18:12:50 -04:00
J. King
f22fe8ba95 Tweak catchupFeed 2017-10-31 09:39:06 -04:00
J. King
2a08edb27d Implement TTRSS catchupFeed operation; fixes #88 2017-10-30 23:18:43 -04:00
J. King
e4ae3ca6ea Use constants for TTRSS' special feeds and categories 2017-10-30 16:18:09 -04:00
J. King
579551f5fd Implement TTRSS operation getFeedTree; fixes #94 2017-10-30 13:11:27 -04:00
J. King
6a700f784c Tests for TTRSS operation setArticleLabel; fixes #90 2017-10-28 10:52:38 -04:00
J. King
5c4772d95a CS fixes 2017-10-20 19:02:42 -04:00
J. King
d05aaf688f Preliminary TTRSS setArticleLabel implementation 2017-10-20 18:17:47 -04:00
J. King
488a7bddac Adapt TTRSS to new type system 2017-10-20 09:54:08 -04:00
J. King
8c6c49d588 Merge changes from master 2017-10-19 22:58:42 -04:00
J. King
d45401fb8b Adapt NCN to new type converter
This has the side-effect of removing the ability to reset a feed's title by passing null explicitly. As a non-standard behaviour it was simpler to just remove it.
2017-10-19 20:35:45 -04:00
J. King
4e3369cd03 List all valid TTRSS input 2017-10-15 12:47:07 -04:00
J. King
fbbf751214 Implement the TTRSS getLabels operation; fixes #89 2017-10-13 17:05:06 -04:00
J. King
20ff08a431 Implement TTTRSS getCounters operation; fixes #79 2017-10-11 12:55:50 -04:00
J. King
c9c6891567 Implement TTRSS getCategories; fixes #81 2017-10-07 12:46:05 -04:00
J. King
0e6eed5699 Add boolean sanitizer to ValueInfo 2017-10-07 12:44:53 -04:00
J. King
7a2de95c70 Consolidate article context handling into articleQuery function
Also consolidated article star counting into a generic articleCount function which accepts a context.

This may lead to slight efficiency losses in either listing or marking (and more significant ones in counting starred), but the advantages of centralized context handling are significant with the future addition of labels and the need to count articles under various future contexts in TTRSS.
2017-10-06 20:26:22 -04:00
J. King
26f6922b25 Partially implement labels
- Backend functions for adding, listing, removing, and editing (renaming) labels currently implemented
- TTRSS functions for adding (fixes #96), removing (fixes #97), and renaming (fixes #98) labels currently implemented
2017-10-05 17:42:12 -04:00
J. King
69b34a4e5a Implement TTRSS feed updating; fixes #86 2017-10-03 16:14:37 -04:00
J. King
03d5d554a9 Imple TTRSS functions getUnread and getConfig
- Fixes #78
- Fixes #85
2017-10-03 12:43:46 -04:00
J. King
bd6f23692c Implement TTRSS feed subscription; fixes #92 2017-10-03 10:43:09 -04:00
J. King
97b0134e56 Merge master 2017-10-02 15:42:15 -04:00
J. King
1b72d45adf Relegate bootstrap.php to testing; fixes #117 2017-10-01 09:33:49 -04:00
J. King
91cce6b529 Implement all TTRSS feed and category handling except subscribing to feeds
- Fixes #93
- Fixes #100
- Fixes #101
- Fixes #102
- Fixes #103
- Fixes #104
2017-09-30 22:15:55 -04:00
J. King
0a0aabe4ed Merge master 2017-09-30 12:52:05 -04:00
J. King
474f7fc2f6 Changelog; CS fixes 2017-09-30 12:05:57 -04:00
J. King
d1e4c6eed3 Fix 405 response of NCN version lister 2017-09-29 18:11:39 -04:00
J. King
00bc7a00a0 Transparently handle HEAD requests; fixes #114 2017-09-29 17:40:07 -04:00
J. King
5488b994f7 Merged master; CS fixes 2017-09-28 10:16:24 -04:00
J. King
96ebf936e4 CS fixes 2017-09-28 09:01:43 -04:00
J. King
d365529493 Multiple fixes to input sanitization
- Database functions now accept any input, but throw typeViolation exceptions where appropriate instead of idMissing or subjectMissing
- Added unit tests for the new Misc\ValueInfo static class
- Added ValueInfo::id() method to centrally validate database IDs, and made use of it consistently
- Made use of PHP's filter_var() function where appropriate when validating or sanitizing input
- Made the NCN protocol handler reject most invalid IDs before handing off to method handlers
- Made NCN's feedUpdate and subscriptionMove methods return 422 on invalid input
- Adjusted several tests to handler type violations
2017-09-27 22:25:45 -04:00
J. King
1af8b733b5 Implement adding TTRSS categories; fixe #99 2017-09-26 22:45:54 -04:00
J. King
7b121c74ec Merge fixes from master 2017-09-26 20:25:11 -04:00
J. King
e74a3ae3cb Fix numerous bugs when adding or changing folders
- Specifying a non-integer parent no longer silently casts to 0 or 1
- Specifying a folder ID of 0 now always converts to null automatically
- Performing both a rename and move to root in the same operation no longer results in potential duplicates
- Calling folderSetProperties with an empty data array no peforms an update; it now returns false before the update call
- Modification timestamps are now actually updated when a folder is modified
- Constraint violation exceptions triggered by code (rather than the database) now print a message
- Renaming a folder or subscription to a non-string value (e.g. an array) throws an exception rather than silently casting
- Added tests to better cover all the above
- Centralized the normalization of integers and title strings into a new ValueInfo static class
2017-09-26 16:45:41 -04:00
J. King
8487a56a60 Tests for TTRSS session handling and version/level reporting
- Fixes #73
- Fixes #74
- Fixes #75
- Fixes #76
- Fixes #77
2017-09-25 10:08:37 -04:00
J. King
6e19517593 Return correct TTRSS error bodies even for HTTP-level errors
TTRSS' error message for these cases (NOT_LOGGED_IN) is not especially helpful, but that's what it returns, so that's what we should return, albeit with correct HTTP status codes.
2017-09-25 08:15:39 -04:00
J. King
3a5d346b9c Preliminary TTRSS handler 2017-09-24 23:32:21 -04:00
J. King
c393dfc42b Sundry fixes
- Make use of PHP 7's null coalescing operator
- remove use of static property in Lang class
- Improve code coverage slightly
2017-09-05 19:35:14 -04:00
J. King
f7e50fe95d Passed code through linter 2017-08-29 10:50:31 -04:00
J. King
cc2296522c More changes in anticipation of a release:
- Don't load a config (and possibly create a database) in CLI if a configuration is not required
- Removed the 'dbSchemaBase' config option, which is really a testing hack
- Added sample Nginx configuration
- Fixed bug in REST handler
- Readme still needs work
2017-08-19 23:56:32 -04:00
J. King
52104fb647 Implement article cleanup; fixes #28 2017-08-17 22:36:15 -04:00
J. King
3b018c89d1 Implemented cleanup of orphaned feeds; fixes #25 2017-08-02 18:27:04 -04:00
J. King
0773e21034 Finish good-enough REST output; fixes #48
Tests can come later
2017-07-27 09:21:00 -04:00
J. King
5df7217cff Improve REST test coverage 2017-07-24 08:15:37 -04:00
J. King
1b970cc7c5 Experimental forking service and accompanying CLI
- Improves #48, #57, and #61
2017-07-21 17:15:43 -04:00
J. King
d3bca6eb47 More code coverage accommodation 2017-07-20 22:40:09 -04:00