Skip to content

A JavaScript web application that allows you to explore random spells and elixirs powered by the WizardWorldApi.

Notifications You must be signed in to change notification settings

mag-z/SBA308A-wizard-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SBA308A: Wizard World Random Generator

Welcome to ⚡🤓🪄 Wizard World Random Generator 🏰🧙‍♂️🦁! This simple JavaScript web application is for Per Scholas skill-based assessment and allows you to explore random spells and elixirs powered by the WizardWorldApi.

📖 Table of Contents

Installation

Simply clone or download the repository and open the index.html file

Usage

Random Spell Generation

Click the 🪄 Learn A Random Spell button to generate a random spell with the spell's details, including incantation, effect, type, and light.

Random Elixir Generation

Click the ⚗️ Learn A Random Elixir button to discover a mysterious elixir with unique effects and characteristics. The elixir's name, effect, side effects, characteristics, and ingredients will be displayed.

Submit Your Feedback

Express your thoughts and suggestions by clicking the ✉️ Send Your Feedback button. A feedback form (textarea) will show up, allowing you to type and submit your magical feedback.

Code Structure

The main application logic is in main.js, where event listeners are set up for the buttons to trigger the respective functions imported from the codebase.

The codebase is then organized into three main modules:

  • spell.js: Contains the function to fetch random spells using the fetch API with a GET request.

  • elixirs.js: Contains the functions to fetch and display random elixirs using the axios library for HTTP GET requests.

  • feedback.js: Handles the submission of user feedback using the axios library for HTTP POST requests.

Preview

Random Spell Preview Random Spell Preview Random Spell Preview

About

A JavaScript web application that allows you to explore random spells and elixirs powered by the WizardWorldApi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published