Closed lemon24 closed 3 years ago
To do:
added_by
entry attribute (feed, user etc.)first_updated
, so user entries can have updated none (#183 / https://github.com/lemon24/reader/issues/179#issuecomment-663840297)
added
entry_dedupe
interactionadd_entry()
mock-up: https://gist.github.com/lemon24/047f71abe76c47661634459eada7b50a
Based on thinking and talking with people about 00-api.py in the linked gist:
A Union[EntryDataLikeProtocol, EntryDataTypedDict]
argument accommodates all of the above, and can (almost) be made to work with typing (example in 01-typing.py).
It may be a good idea to allow the nested types (Content, Enclosure) to be typed dicts as well (in 79a18c5). In cases like this, I'd like there to be a standard serialization library in Python (like Rust has Serde); maybe it's time to give mashumaro a try (https://github.com/lemon24/reader/issues/247#issuecomment-886022571).
Decisions:
add_entry(entry: Any)
, leave fancy typing for lateruser
entries can't be updateddelete_entry()
only deletes user
entriesentry_dedupe
doesn't distinguish between user and non-user entries (there may be undesired side-effects to this, but eh...)
Use case:
A possible solution is "share anything" articles (mentioned in https://github.com/lemon24/reader/issues/96#issuecomment-460077441), but for existing feeds.
Another solution might be to use the mechanism from #222 to backfill old articles.