Commit Graph

25 Commits

Author SHA1 Message Date
Jonathan Flueren
3534c43976 Adjust expected DateTime format to gpodder - UTC ISO 8601 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
Jonathan Flueren
91c2dccd3c Test array parsing without guid 2021-10-06 19:40:52 +02:00
Jonathan Flueren
7813339a95 Allow EpisodeAction upload as array
Parsing EpisodeActions from String can lead to problems if the String is changed by only a little bits.
Additionally, the gpodder api describes the upload as Array.
Uploading EpisodeActions as String is still possible.
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
2a988e91a6 test only with new episode_action.datetime_epoch field 2021-10-06 14:06:45 +02:00
thrillfall
a11850e995 dont run test that fails on mysql or sqlite database 2021-10-06 14:06:45 +02:00
thrillfall
39e094e812 make test independent of test system timezone 2021-10-06 14:06:45 +02:00
thrillfall
aa09c8d0a3 expect also sqlite exception message in test 2021-10-06 14:06:45 +02:00
thrillfall
ac1acf079b provide episode_action timestamps as UTC in api response 2021-10-06 14:06:45 +02:00
thrillfall
aa024e55f8 add new timestamp database field. add migration step to convert timestamps to unix epoch 2021-10-06 14:06:45 +02:00
thrillfall
2e8ba1b0ad adapt tests to new dbal exception class in nc >=21 2021-10-06 14:06:45 +02:00
thrillfall
ff4798f6da do not null EpisodeAction.guid when processing request without guid 2021-08-29 13:14:40 +02:00
thrillfall
a336618ada make it clearer when we insert test data in the database 2021-08-29 13:14:40 +02:00
thrillfall
9f0c06e919 test we still retrieve the correct episode action by guid when episode url changes 2021-08-29 13:14:40 +02:00
thrillfall
352802ca69 update existing episode actions with guid 2021-08-29 13:14:40 +02:00
thrillfall
850dfd5eb4 add guid to episode action and make it findable by it 2021-08-29 13:14:40 +02:00
thrillfall
ae27f7cf34 test unique index constraint for episode actions 2021-08-29 13:14:40 +02:00
thrillfall
ba0d4f4357 parse optional guid from EpisodeAction request 2021-08-29 13:14:40 +02:00
thrillfall
20a647906a do not pass same data twice 2021-08-27 12:51:29 +02:00
Jonathan Flueren
48b78669e6 Enable processing of multiple EpisodeActions
EpisodeAction/create now can deal with multiple EpisodeActions inside a single EpisodeAction string, they will be processed one after another.
For this EpisodeActionReader->fromString() now returns an array of EpisodeActions.
2021-08-24 22:31:24 +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
324aecd7b8 make subscription changes endpoint comply with gpodder.net api 2021-07-13 21:36:34 +02:00
Matthias Gutjahr
cd5a77281e
Fix compatibility with more recent versions of PHPUnit 2021-07-13 09:43:54 +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