#606 Implement v2 media endpoint#607
#606 Implement v2 media endpoint#607Lastorder-DC wants to merge 2 commits intoNicolasConstant:developfrom
Conversation
|
Thanks for contributing to Sengi! Unfortunately we can't remove v1 support: since other software (like Pleroma) might rely on it, we could call v1 or v2 depending on the software/version used, a bit like how it's done in the search API call wrapping. |
|
Okay. will change code to implement both v1 and v2. |
|
Can I implement v1 as a fallback? since v2 is more reliable than v1(if supported), and both mastodon compatible sw I know(pleroma and its fork akkoma) supports v2 media endpoint. (edit) |
|
Take all the time you need. 🙂 Instead of a fallback (that would mean calling twice in the worth case) I would rather analyses the instance's version and call the appropriate version. For example the search api is called after this analysis was done; I would reuse a similar pattern before calling the new media implementation. (Of course, if we migrate more and more v2 implementation, that would be useful to regroup this particular logic in a dedicated layer, but lest keep things as they are for now) |
https://docs.joinmastodon.org/methods/media/
It replaces v1 media endpoint with v2 media endpoint.