Project Name:
Star Wars Character API
Software & Technologies Used:
-APIs
-CSS/SASS
-HTML
-JavaScript
-JavaScript Libraries
-Responsive Design
-VS Code
Client:
Fanshawe College (Assignment)
Link:
Star Wars Character APIDescription:
An assignment to demonstrate API knowledge by using the Star Wars API (SWAPI).
For Term 4, we were tasked with creating a website where we would apply our knowledge of how to call and pull data from APIs and make a website from the Star Wars API (SWAPI) that pulls a list of characters, and when you click on them, it displays a movie that they were in.
This project seemed pretty straightforward, but it was a little difficult to initially track down the data. Luckily, we had examples of how to find the information we need by using console.log. By taking it one step at a time, my partner and I managed to track down and populate the page with all of the data we needed.
But data wasn’t enough. We had a task that, if we wanted to challenge ourselves, we could find a way to randomize the movie as a character could be in multiple movies. With a bit of research, I managed to find a way using the Math.random function, where it would take one of the members of the movie array and apply it as a dataset, so that when it’s called, that movie number would be associated with the character, and it would be different on each reload. I took this information and used it as a way to change and display content, especially the background image.
Thumbnail
Using only Greensock's animation library, users are immediately greeted with a screen that's reminiscent of the opening title from the movies. Unfortunately, no opening crawl to accompany it.
In the assignment, we were asked to display a list of characters from SWAPI, and these were the first 10 results we got from the list!
When you click on a character, it accesses the character's information, and we pull the movie data from it. The background dynamically changes to a famous location from that movie. The movie, if a character appears in more than one, gets randomized too!
Thumbnail
Thumbnail
Thumbnail