-
Notifications
You must be signed in to change notification settings - Fork 12
add new api #401
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
add new api #401
Conversation
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.
Pull Request Overview
This PR adds a new API method getQuizAllQuestions to retrieve all questions for a specific quiz from the Constructor.io API.
- Implements
getQuizAllQuestionsmethod with parameter validation and error handling - Adds comprehensive test coverage for the new API endpoint
- Follows existing patterns for quiz API methods including timeout handling and response validation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/modules/quizzes.js | Adds the new getQuizAllQuestions method implementation |
| spec/src/modules/quizzes.js | Adds comprehensive test suite for the new method covering various scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
esezen
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.
@v-i-s-h-n-u-ps this is looking good. Do you mind updating types as well? Also quick side q, does this question only take versionId and not sessionId?
src/modules/quizzes.js
Outdated
| * @function getQuizAllQuestions | ||
| * @description Retrieve all questions for a particular quiz from Constructor.io API | ||
| * @param {string} quizId - The identifier of the quiz | ||
| * @param {string} parameters - Additional parameters |
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.
| * @param {string} parameters - Additional parameters | |
| * @param {object} parameters - Additional parameters |
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.
Added types and updated the change 22d68b0
…-i-s-h-n-u-ps/constructorio-client-javascript into NO-REF/add-new-api-for-quizzes merged
The API takes, sessionId as well as an optional param. |
Shouldn't we include it in the function (JSDocs) then? Am I missing something? |
Nope, it was I who missed it. Thank you. |
esezen
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.
LGTM!
No description provided.