-
Notifications
You must be signed in to change notification settings - Fork 9
[FEATURE] Add Data API support with automatic routing metadata header… #38
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
base: master
Are you sure you want to change the base?
[FEATURE] Add Data API support with automatic routing metadata header… #38
Conversation
|
Reviewing now |
michael-linnane-lrn
left a comment
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.
Thanks for adding robust tests and docs here @danny-beton-lrn. Just the one comment regarding the codacy warning
docs/quickstart/index.js
Outdated
| } | ||
| } | ||
| } catch (error) { | ||
| demo1_output = [{ error: error.message }]; |
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: This might be better served with a specific error variable rather than making it fit to the demo1_output typing. It would also simplify the conditional logic above by replacing each of the
<% if (demo1_output.length > 0 && demo1_output[0].error) { %>
<div class="error">Error: <%= demo1_output[0].error %></div>
<% } else { %>
with something like
<% if (demo1_error) { %>
<div class="error">Error: <%= demo1_error %></div>
<% } else { %>
...
<% if (demo2_error) { %>
<div class="error">Error: <%= demo2_error %></div>
<% } else { %>
Increases space usage but improves readability
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've made that change, thanks @michael-linnane-lrn 👍
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.
👏 Praise: Excellent documentation 🙌
michael-linnane-lrn
left a comment
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.
The only comment left from me is a nit comment. Non blocking so feel free to ignore if you think so
georgios-kanellopoulos-lrn
left a comment
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.
Nice work Danny! 👏
I just left a small suggestion.
|
LGTM @danny-beton-lrn 🚢 |
Add Data API Support to Node.js SDK
This PR adds comprehensive Data API support to the Learnosity Node.js SDK + add the new request header metadata and updated the quickstart demo.
What's New