Commit Graph

34 Commits

Author SHA1 Message Date
kalle (jag) 3a84b2506b Apply suggestions from code review
Co-authored-by: Jonathan Flueren <11487762+JonOfUs@users.noreply.github.com>
2022-10-28 09:50:44 +02:00
Kalle Fagerberg 5a52efea07 Removed trailing comma in __construct params 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 62675a52a7 Removed unnecessary userId=null checks 2022-10-28 09:50:44 +02:00
Kalle Fagerberg a5d5278956 Removed unused code & check for userId==null 2022-10-28 09:50:44 +02:00
Kalle Fagerberg a5a69fa3f7 Added image proxying/caching 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 4771a52b63 Extracted PodcastData to its own endpoint 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 403ead674d Changed to implement JsonSerializable 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 6b0550f14b Refactored code out to Core ns and data classes 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 0e661a439f Removed unused namespaces 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 4886afd8d6 Changed defaultSubscriptionData to static 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 71e8faf8cd Smallfix errors 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 33dd043dcb Added fetched podcast data 2022-10-28 09:50:44 +02:00
Kalle Fagerberg 226054a634 Moved personal metrics to API endpoint 2022-10-28 09:50:44 +02:00
Jonathan Flueren 2ce7911856 Simplify null value check 2022-05-25 23:57:42 +02:00
Jonathan Flueren 0d6492e99d Set default since timestamp to 0 2022-05-25 23:57:42 +02:00
Jonathan Flueren 2521efa34d Don't crash on unauthenticated api call 2022-05-04 19:23:31 +02:00
Matthias Gutjahr 056b12a667 Add check for EpisodeAction properties
- also add type hints and phpdocs
- add additional unit tests
- set integer types in EpisodeActionEntity
- correctly call static methods
- improve exception handling in EpisodeActionSaver
- remove unused method EpisodeActionWriter::purge()
2021-11-03 13:51:26 +01:00
Matthias Gutjahr 1d2056e025 Add check for EpisodeAction properties
- also add type hints and phpdocs
- add additional unit tests
- set integer types in EpisodeActionEntity
- correctly call static methods
- improve exception handling in EpisodeActionSaver
- remove unused method EpisodeActionWriter::purge()
2021-11-03 13:51:26 +01:00
Jonathan Flueren 52b6d8e8a2 Add timestamp to subscription change response 2021-10-17 19:48:13 +02:00
thrillfall 76ee383ea4 remove unused VersionController 2021-10-13 22:54:15 +02:00
Jonathan Flueren d131b59348 Align episode upload format to gpodder-api
'started', 'position' and 'total' are optional and 'timestamp' is in 'Y-m-d\TH:i:s' format
2021-10-06 19:40:52 +02:00
Jonathan Flueren 795a9253d2 Adjust EpisodeAction upload to gpodder api, remove String upload
Remove 3rd dimension of POST data by directly accessing request data - a simple EpisodeActions array has to be posted now. This way the api is closer to gpodder.
Additionally, removed EpisodeAction upload as String, so it's now incompatible with older versions
2021-10-06 19:40:52 +02:00
thrillfall 499d11d209 query episode actions by unix timestamp (instead of datetime object) 2021-10-06 14:06:45 +02:00
thrillfall 352802ca69 update existing episode actions with guid 2021-08-29 13:14:40 +02:00
thrillfall a29aa2ccd5 extract parsing and storing episode action to separate class 2021-08-22 22:45:34 +02:00
thrillfall 83c18ad623 narrow catch to nextcloud dbal exceptions 2021-08-22 21:59:45 +02:00
thrillfall 57f0691b4c nextcloud < v22.0 throws UniqueConstraintViolationException. This can be reverted after v21 reaches end of support 2021-08-21 20:20:24 +02:00
thrillfall ab155ca94a fix inspection warnings 2021-08-17 19:41:54 +02:00
Jonathan Flueren 9ac7758e87 Correct empty timestamp check in createDateTimeFromTimestamp
createDateTimeFromTimestamp interpreted 0 as timestamp as a mistake while 0 is a valid timestamp.
The fix checks if timestamp is null (not defined/initialized), so that 0 is treated as a correct timestamp.
2021-08-12 15:27:58 +02:00
Jonathan Flueren e438ae94dd Revert change of timestamp format
Reverting the change of format of the timestamp that gets saved into episode_action table.
Reason: The 'T' was in there so that the timestamp format is like AntennaPod's timestamp format.
2021-07-24 20:11:42 +02:00
Jonathan Flueren 5a46233e46 Update EpisodeActionController.php
Use UTC timestamp for episode actions instead of the timezone used by the AntennaPod app.
Correct conversion should be assured because the AntennaPod timestamp includes a timezone identifier (T).

Also slightly change the output format for the DateTime-timestamp to equal other timestamp formats.
2021-07-24 19:06:14 +02:00
thrillfall ad3b9c107d convert timestamp from episode action request to format also mysql can process 2021-07-22 23:44:45 +02:00
thrillfall b09210655e unique key violation exception is thrown as \Exception thus we need to check the reason 2021-07-11 22:52:30 +02:00
thrillfall 72bf365285 parse EpisodeAction message from AntennaPod
persist and list with database

create episodeAction list reponse (with mocked timestamp, started and total)

create episodeActions with received values

update existing episodeActions by unique episode link

receive and store subscription changes

deal with multiple subscription changes in single request

split database into subdirectories

only return subscription changes younger then passed parameter since

parse passed timestamp

parse passed timestamp for episode_actions listing

only return list of urls for subscription changes

align list endpoint naming schema

store userId with episode actions and subscriptions

return json object on application root route
2021-06-27 13:24:17 +02:00