https://github.com/malanski/star-wars-api
Fetching data from swapi
https://github.com/malanski/star-wars-api
Last synced: 12 months ago
JSON representation
Fetching data from swapi
- Host: GitHub
- URL: https://github.com/malanski/star-wars-api
- Owner: malanski
- Created: 2023-07-03T23:42:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-04T01:34:43.000Z (almost 3 years ago)
- Last Synced: 2025-01-12T23:30:05.847Z (over 1 year ago)
- Language: JavaScript
- Size: 2.96 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Star Wars Random Character API Fetching
## Introduction
This is a simple web application that fetches a random character from the Star Wars universe using the Star Wars API (SWAPI). The app allows users to toggle between light and dark modes for a better user experience.
## Features
- Random Character Fetch: Clicking the "Get Random Character" button fetches a random character's information from the Star Wars API and displays it on the page.
- Dark Mode: Users can switch between light and dark mode for better readability and aesthetics.
## Technologies Used
- HTML
- CSS
- JavaScript
- Axios Library (for API fetching)
## How to Use
1. Clone the repository or download the files to your local machine.
2. Open `index.html` in your web browser.
## Dark Mode Switcher
The app includes a dark mode switcher for better viewing at night or in low-light environments. When the dark mode is active, the page background, text, and other elements will change to dark colors for reduced eye strain.
## Random Character Fetching
Upon clicking the "Get Random Character" button, the app will fetch a random character's information from the Star Wars API (SWAPI). The information displayed includes:
- Name
- Height
- Mass
- Birth Year
- Gender
- Hair Color
- Skin Color
- Eye Color
- Homeworld
In case there is an error while fetching the data, the app will display an error message to inform the user.
## Acknowledgments
- This app uses the Star Wars API (SWAPI) to fetch character information. SWAPI is a comprehensive API that provides access to data from the Star Wars films.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Disclaimer
This web application is created for educational purposes and is not affiliated with Lucasfilm Ltd. or any Star Wars entities. The character information displayed is sourced from SWAPI, and all rights to the Star Wars franchise and its characters belong to Lucasfilm Ltd.