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
We follow a few different patterns throughout the codebase, so I think we should try to sync up.
In some constructors, you might find this.makeRequest_ = storage.bucket.makeRequest.bind(storage.bucket). In other places, we define a makeRequest_ on the prototype. (props to @callmehiphop for first calling us out on this).
We should also clear up the naming conventions around making requests. Currently:
It should make it easier to follow along with, and it should be possible.
Also note using (reqOpts, callback) over (method, path, query, body, callback). It's pretty non-JS to have multiple arguments. We should just use the standard request options format, with reqOpts.uri, reqOpts.method, reqOpts.qs, reqOpts.json, etc.
LMKWYT!
The text was updated successfully, but these errors were encountered:
We follow a few different patterns throughout the codebase, so I think we should try to sync up.
In some constructors, you might find
this.makeRequest_ = storage.bucket.makeRequest.bind(storage.bucket)
. In other places, we define amakeRequest_
on the prototype. (props to @callmehiphop for first calling us out on this).We should also clear up the naming conventions around making requests. Currently:
I think we should go through and have only one style;
Class.prototype.request
instead of constructor-initialized functions.It should make it easier to follow along with, and it should be possible.
Also note using
(reqOpts, callback)
over(method, path, query, body, callback)
. It's pretty non-JS to have multiple arguments. We should just use the standardrequest
options format, withreqOpts.uri
,reqOpts.method
,reqOpts.qs
,reqOpts.json
, etc.LMKWYT!
The text was updated successfully, but these errors were encountered: