Commit graph

26 commits

Author SHA1 Message Date
da092d5f8c Changed Misc\DateFormatter to a collection of static methods and renamed it to Date; renamed Data to Arsse to avoid confusion and better reflect its centrality 2017-07-17 07:47:57 -04:00
6d4aa4db6e Minimally functional, highly experimental, working server
- Basic update service handles only one feed at a time and possibly leaks memory
- Output for REST requests is still very basic
- No avatar support
- No reporting of whether cron works
- No cleanup before or after feed updates
2017-07-15 16:44:06 -04:00
4992b2c669 Tests for NCN v1 article listing and marking, with slight fixes
-Fixes #7
-Fixes #13
-Fixes #14
-Fixes #15
-Fixes #16
-Fixes #17
-Fixes #18
-Fixes #19
-Fixes #20
-Fixes #21
-Fixes #22
-Fixes #23
-Fixes #24
2017-07-09 17:57:18 -04:00
b3f631e335 Use more reliable database locking strategy; reorganize tests
PostgreSQL and MySQL both have better locking mechanisms than what was previously implemented, as well
2017-07-07 21:06:38 -04:00
17ec6cf669 Move date formatting out of SQL and standardize on the DateFormatter trait
Fixes #56
2017-07-07 15:25:47 -04:00
3fad820be4 REST functions for article listing and marking
Needs testing
2017-07-07 08:13:03 -04:00
483874e21d Implemented query contexts
- Fixes #55
- Included test for Context
- Adjusted Database::editionLatest() to use Context
- Adjusted NCN handler and tests accordingly
- Also refined experimental Database::articleList() method and added experimental Database::articlePropertiesSet() method
2017-06-18 10:23:37 -04:00
dd24246f49 Finished last of feedUpdate tests; implemented NCN API functions
- Fixes #26
- Fixes #27
2017-06-03 17:34:37 -04:00
81419452b5 Added topmost folder to output of subscriptionList. Fixes #54
- Adjusted NCN handler to use the topmost folder for folderId; suppressed the actual folder so as not to pollute output with non-standard data
- Updated tests
2017-06-01 18:12:08 -04:00
88c0f4986c Implement NCN API v1-2 feed handling: tests
- Fixes #8
- Fixes #9
- Fixes #10
- Fixes #11
- Fixes #12

- Differentiated between a missing ID which is the subject of an action (e.g. the subscription when moving a subscription) and other missing IDs (e.g. the folder when moving a subscription)
- Enforced same rules for subscription titles as for folder names, save that null is valid for subscriptions
2017-05-21 10:10:36 -04:00
054200dfc0 Fix potential of erroneous matching of URL containing encoded #. 2017-05-20 08:57:24 -04:00
0972cff660 Completely revamped NCNv1 REST handler
- URLs are now matched centrally against a whitelist
- %-encoded URLs are still handled correctly
- Dispatched methods now only handle one specific task
- Filler methods (e.g. versionPOST) are no longer required
- Unhandled URLs now return 501 Not Implemented rather than 404 Not Found; this removes some ambiguity in the semantics of 404
2017-05-19 23:52:26 -04:00
4a816f827b NCNv1 feed calls and other changes
- Implemented all but one feed-related function (it's more ofan item function)
- Fixed time conversion for input into SQL; dates in PM were previously wrong
- Added miscellaneous tentative functions to Database to help with peculiarities of NCNv1; these may change
- Tests to come soon
2017-05-18 23:03:33 -04:00
a67fe30408 Fix whitespace
Also fixed my editor so tabs won't happen again!
2017-04-06 21:41:21 -04:00
929d763981 Simplify the creation of arbitrary UPDATEs
The type parameters of Db\Driver::prepare() and the parameters of Db\Statement::run() can now be arrays, which will be iterated over recursively to bind scalar values to the SQL statement.

This simplifies the construction of arbitrary UPDATE statements (the WHERE clause no longer needs to be taken into account) and should make it clearer what is happening in these cases.

It should also simplify the creation of IN() clauses down the road if they become necessary.
2017-04-06 11:02:47 -04:00
74ae1106a4 Implement NCN API v1-2 server version reporting
- Fixes #29
- Yes, it's trivial, but now it's done!
2017-04-02 21:49:37 -04:00
9cbfa378bc Implement NCN API v1-2 folder deleting/renaming
- Fixes #5
- Fixes #6
- Rewrote the NCNv1 dispatcher to better handle URL edge cases
2017-04-02 21:34:30 -04:00
19abce85c3 Implement NCN API v1-2 folder creation
- Fixes #4
- Tests for failure modes still required
2017-04-02 12:14:15 -04:00
842e277d43 Implemented NCN API v1-2 folder list
- Fixes #2
- Also re-organized REST handling
2017-04-01 23:06:52 -04:00
dc9f5e545e Fix adding a feed
Also start on handling the v1-2 API
2017-04-01 15:42:10 -04:00
f902346b6c Eliminated passing of RuntimeData instances
- RuntimeData has now been replaced by a single static Data class
- The Data class has a load() method which fills the same role as the constructor of RuntimeData
- The static Lang class is now an instantiable class and is a member of Data
- All tests have been adjusted and pass
- The Exception tests no longer require convoluted workarounds: a simple mock  for Data::$l suffices; Lang tests also use a mock to prevent loops now instead of using a workaround
2017-03-28 18:50:00 -04:00
7236020b8b Changed "NewsSync" to "Arsse" 2017-03-27 23:12:12 -05:00
8b50297e6d Complete tests for NCN version list
- Fixes #47
- Implemented an AbstractHandler class with a generic URL parser
2017-03-24 13:16:34 -04:00
25d9158171 Fix output of NCN version list
List is supposed to be contained in a JSON object, not a bare list
2017-03-19 21:54:28 -04:00
536fa5c4fd Implement NextCloud News version detection
- Improves #47
- Still needs wrapping to actually output to clients
2017-03-19 21:50:00 -04:00
9a8def03c2 Fill in more of the REST handler.
Not yet functional.
2017-03-18 22:30:36 -04:00