-
Notifications
You must be signed in to change notification settings - Fork 438
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
api: add /feed API to get an Atom feed for an URI #419
api: add /feed API to get an Atom feed for an URI #419
Conversation
acf81ec
to
72a2ccc
Compare
We need absolute URL at some places. We assume the first host configured is the base of the URI we have. Fix isso-comments#81
72a2ccc
to
7650465
Compare
Tests have been added. Caching should work properly and the client side too. The only problem I see is the use of the first host defined in |
7650465
to
bceb695
Compare
isso/views/comments.py
Outdated
'uri': uri, | ||
'order_by': 'id', | ||
'asc': 0, | ||
'limit': 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be an option in isso.conf
isso/views/comments.py
Outdated
except ValueError: | ||
return BadRequest("limit should be integer") | ||
comments = self.comments.fetch(**args) | ||
base = self.conf.get('host').split()[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put this line in the init, something like:
self.main_host = self.conf.get('host').split()[0] # or first_host
or
self.hosts = self.conf.get('host').split() # and then select the first inside code
The parse(base).netloc
too I would put it in the init
Just like you suggested, adding a section |
On server-side, this can be enabled by providing a base URL to use to build the full URL. Limit also becomes configurable. On client-side, we need to add a switch to know whatever or not the additional link can be displayed.
I've added a commit to include some configuration on both server-side and client-side. |
Forgot to include HTML rendering. I've pushed another commit for that. |
a6709ba
to
01cf96e
Compare
We need absolute URL at some places. We assume the first host
configured is the base of the URI we have.
Fix #81.
This is mostly a "RFC". Notably, tests are missing.