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
Fixes #41 - Added Api#fetchServerSettings. #55
Conversation
This is now ready for review. r=? @leplatrem @Natim @ametaireau |
@@ -60,11 +61,11 @@ export default class Api { | |||
* @return {String} | |||
*/ | |||
endpoints(options={fullUrl: true}) { | |||
var root = options.fullUrl ? this.remote : `/${this.version}`; | |||
var root = options.fullUrl ? `${this.remote}/` : `/${this.version}/`; | |||
var urls = { | |||
root: () => root, |
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.
nit: I would have put the trailing slash here, so that assembling urls remains consistent (with /
as join char)
Some version of the protocol don't have the settings parameter. What is the client behavior in case the settings is undefixed? Shall we consider that the server doesn't follow the protocol in that case or should we fallback to default values on client side? |
Which versions? The client is designed to support a single version of the protocol, which is v1. Do you mean it should also support previous versions of that version?
You get an error. TBH I don't really want to start supporting versioning the version. |
In that case it means we should document the list of provided settings in kinto documentation. |
r+ +1 to document settings explicitly in Kinto endpoints docs |
You mean in Kinto server, right? Server settings are transparent for client users. |
Fixes #41 - Added Api#fetchServerSettings.
Yes, see Kinto/kinto#133 |
Fixes #41 - Added Api#fetchServerSettings.
Goals
The client should retrieve server settings from the
/vX
endpoint; for now, the only setting we need is thebatch_limit one
.Tasks
/vX
endpoint, then store the settings in a localApi
property;Notes