The Virtual Assistant API is designed to provide users with personalized responses based on their input and the day of the week. This API acts as the foundation for a virtual assistant app, delivering a friendly greeting and a cheerful message to enhance the user's experience.
GET /assistant/greet?name=<user_name>
- name (required): The user's name, sent as a query parameter.
A JSON object containing:
- A personalized welcome message using the provided name.
- A cheerful message depending on the current day of the week.
{
"welcomeMessage": "Hello, John! Welcome to our assistant app!",
"dayMessage": "Happy Monday! Start your week with energy!"
}{
"welcomeMessage": "Hello, John! Welcome to our assistant app!",
"dayMessage": "It's Friday! The weekend is near!"
}{
"welcomeMessage": "Hello, John! Welcome to our assistant app!",
"dayMessage": "Have a wonderful day!"
}- Go to the repository on GitHub and click the Fork button at the top right of the page.
This will create a copy of the repository in your own GitHub account.
- Once the repository is forked, click the Clone button and copy the link (HTTPS or SSH).
- Open your terminal/command prompt and run:
Replace
git clone <repository_url>
<repository_url>with the link you copied from your GitHub.
- Navigate to the cloned directory:
cd <repository_folder>
- Install all necessary dependencies mentioned in the
package.jsonfile:npm install
- After completing the task, commit and push your changes to your GitHub repository:
git add . git commit -m "Completed Virtual Assistant API task" git push origin main
- Submit the GitHub repository link on the assignment page.
The link should follow this format:
https://github.com/<your_username>/<repository_name>
If your GitHub username is johnDoe and your repository is named virtual-assistant-api, the submission link would be:
https://github.com/johnDoe/virtual-assistant-api