You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.xhr(options, callback) where callback arguments are error and result ( xhr.responseXML or xhr.response)
.fetch(resource, options) where success is result or throws error.
Incorrectly marked
.authenticate(callback) where callback arguments should be marked as error and self.
.authenticateAsync() where success should be marked as self or throws error.
.bootstrapToken(auth_code, callback) where callback arguments should be marked as error and self.
Why?
In each of these functions success is marked as result, however this is not true. This unsystematic nature complicates learning how to use the library. If a function returns self, it should be written as self, and when it returns a request result, it should be written as result. This is clear, sensible, and lucid.
The text was updated successfully, but these errors were encountered:
Correctly marked
.xhr(options, callback)
wherecallback
arguments areerror
andresult
(xhr.responseXML
orxhr.response
).fetch(resource, options)
where success isresult
or throwserror
.Incorrectly marked
.authenticate(callback)
wherecallback
arguments should be marked aserror
andself
..authenticateAsync()
where success should be marked asself
or throwserror
..bootstrapToken(auth_code, callback)
wherecallback
arguments should be marked aserror
andself
.Why?
In each of these functions success is marked as
result
, however this is not true. This unsystematic nature complicates learning how to use the library. If a function returns self, it should be written asself
, and when it returns a request result, it should be written asresult
. This is clear, sensible, and lucid.The text was updated successfully, but these errors were encountered: