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
Assets #154
Conversation
231add0
to
be92254
Compare
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 seems quite straightforward and also easy to use from the FTW perspective.
src/sdk.js
Outdated
@@ -402,7 +456,7 @@ const createMarketplaceApiEndpointInterceptors = httpOpts => | |||
// | |||
marketplaceApiEndpoints.reduce((acc, { path, method, multipart }) => { | |||
const fnPath = urlPathToFnPath(path); | |||
const url = `api/${path}`; | |||
const urlTemplate = _.template(`api/${path}`); |
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 found it difficult at first to understand what this change from url
to urlTemplate
means to why it was made. I think I got it but maybe it would be nice to have a code comment somewhere to explain what's happening.
f6315c3
to
1077819
Compare
d0ae704
to
ce7cb9f
Compare
Lodash template seems to have some CSP issues (lodash/lodash#832). The downside of using JS templates (+ a wrapping function) is that the endpoints.js isn't pure data anymore.
This PR adds support for Assets. It's based on #155
In this PR:
Interface looks like this: