Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to the new Shiori API once released #2074

Closed
fierceX opened this issue Sep 14, 2023 · 12 comments · Fixed by #2925
Closed

Upgrade to the new Shiori API once released #2074

fierceX opened this issue Sep 14, 2023 · 12 comments · Fixed by #2925
Labels

Comments

@fierceX
Copy link

fierceX commented Sep 14, 2023

Update the api of shiori. The current api has been abandoned and doesn't work on the latest version of shiori. You want to update the api of shiori.

https://github.com/go-shiori/shiori/blob/master/docs/APIv1.md

@fguillot
Copy link
Member

The Miniflux integration is tested against the latest stable version of Shiori which is currently v1.5.5 at the time of writing this comment.

The new Shiori API could be implemented in Miniflux after the Shiori authors release a new stable version.

@fguillot fguillot changed the title shiori doesn't work Upgrade to the new Shiori API once released Sep 15, 2023
@cendenta
Copy link

APIv1 is mentioned in the release notes of Shiori v1.6.0. However, it doesn't seem stable quite yet (it mentions running legacy and new APIs at the same time). Hopefully it will stabilize soon, as the Miniflux integration doesn't seem to work for this version.

@mateusjdev
Copy link

Old api is still working (for now) with a new endpoint, is a easy patch: mateusjdev@53f2c4f but it will fail with Shiori v1.5.5 or older

@essys
Copy link

essys commented Apr 8, 2024

The Miniflux integration is tested against the latest stable version of Shiori which is currently v1.5.5 at the time of writing this comment.

The new Shiori API could be implemented in Miniflux after the Shiori authors release a new stable version.

The new API was introduced to the current stable release which currently is v1.6.2.
Is it possible to integrate adaptations to the new API structure to Miniflux?

@mateusjdev
Copy link

The new API was introduced to the current stable release which currently is v1.6.2. Is it possible to integrate adaptations to the new API structure to Miniflux?

It's possible but still not finished right now, on version v1.6.2 the new API endpoint doesn't support bookmark creation, in shiori roadmap it is planned to v1.9.0, then:

  • if you want "stable" shiori and miniflux integration, stay in shiori v1.5.5 (if you already upgraded to v1.6.1 and later, you cannot go back to v1.5.5 easily because of database migrations)
  • if you know how to compile miniflux, you can use v1.6.1 and later with this commits: mateusjdev@53f2c4f, mateusjdev@60e1074

@quaintdev
Copy link

Old api is still working (for now) with a new endpoint, is a easy patch: mateusjdev@53f2c4f but it will fail with Shiori v1.5.5 or older

Any chance this can be merged to main? Shiori has moved to 1.7.0 version.

@samirettali
Copy link

Old api is still working (for now) with a new endpoint, is a easy patch: mateusjdev@53f2c4f but it will fail with Shiori v1.5.5 or older

Any chance this can be merged to main? Shiori has moved to 1.7.0 version.

+1 for this

@TH0MVS
Copy link

TH0MVS commented Sep 1, 2024

Old api is still working (for now) with a new endpoint, is a easy patch: mateusjdev@53f2c4f but it will fail with Shiori v1.5.5 or older

Any chance this can be merged to main? Shiori has moved to 1.7.0 version.

+1 for this

+1 for that

@thallada
Copy link

thallada commented Sep 6, 2024

It doesn't look like shiori has added a way to save a new bookmark in the 1.7.0 version yet. It's planned on the roadmap for 1.9.0 and I don't see an endpoint for creating a bookmark in the swagger docs on 1.7.0. I don't see how the patch mateusjdev@53f2c4f will work since it is pointing to an endpoint that will not exist until 1.9.0 is released.

So, you really have to downgrade shiori to 1.5.5 and probably drop your shiori database in the process :( Pretty bummed about this situation since I am trying to find a way to archive saved entries in a self-hosted way and archivebox is not a supported integration either.

@mateusjdev
Copy link

mateusjdev@53f2c4f alone won't work, it was a patch for v1.5.5 only, but there's mateusjdev@60e1074 which will work for v1.6.1 and later (I'm using it with v1.7.0).

The only problem is shiori main developer is modifying the API instead of creating a separate one, so every new change breaks miniflux integration:

  • Shiori v1.5.5: Changed endpoint "/api/bookmarks" to "/api/v1/bookmarks" and "/api/login" to "/api/v1/auth/login" (fix with mateusjdev@53f2c4f)
  • Shiori v1.6.2: Changed endpoint "/api/v1/bookmarks" back to "/api/bookmarks" and the structure of the auth-response.json (fix with mateusjdev@60e1074)

And it will need to be changed again when v1.9.0 gets released, and there's no easy way on miniflux to check which Shiori version you'd be using.

So in resume: These patches are a easy temporary fix, they will break setups where miniflux is updated and Shiori is not (but obviously people with both updated had already broke). Another thing is Shiori project is slowing down, main developer is probably busy so don't know when v1.9.0 will get released.

@fmartingr
Copy link

Hey guys, Shiori maintainer here. Let me know how can I help you move this forward so we have it in a useable state.

Problem with the API changes in Shiori is that the logic was tightly coupled in the API and the store layers. I'm trying my best to evolve the API but it seems that I'm breaking old integrations in the process. I wasn't aware of this and since the login and session were pretty bad (logging you out everywhere when you logged in using the API programatically).

You guys are right that I should have left the old API running intact and only remove it once the new one was working, I will try to figure something out.

I'm happy to listen to ideas here, even if we can have a temporary solution until the entire API is migrated.

@tiesselune
Copy link
Contributor

Just starting making a pull request for this before I even saw there was an issue about it :#2925

It works on Shiori 1.7.1 with new authentication flow (token instead of session, v1 API) and the legacy bookmark POST API.

Let me know if I can do anything to make it better while waiting for V1 to land officially for the /bookmarks POST method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.