spencerwi / cliflux

A terminal client for Miniflux RSS reader
MIT License
11 stars 3 forks source link

Assume base_url is the API url, not the bare domain #12

Closed 0atman closed 2 months ago

0atman commented 3 months ago

Problem

I don't know if I'm right here - but I was confused that miniflux.app has /v1/ already appended to the API Endpoint when you make an api key:

image

But writing that into ~/.config/cliflux/config.toml causes this error in cliflux:

Error 404 Not Found: HTTP status client error (404 Not Found) for url   
(https://reader.miniflux.app/v1/v1/entries?status=unread&order=published_at&direction=desc&limit=100&offset=0)                                         

note /v1/v1/ in the formatted url.

What this PR does to fix it

Bonuses

Rationale

This of course could easily be fixed by removing /v1/ in the config file when you paste in your base_url, but I think the assumption is wrong:

base_url should be the API base, not the bare domain, I think?

Thank you!

spencerwi commented 3 months ago

I don't think I agree with this change for a few reasons:

That said, if this is a clearer mental model for you, I'm not offended by your use of a personal fork.

0atman commented 2 months ago

Very fine points! Thank you again :smile: