This is an application that generates characters from the Rick and Morty show by fetching data from a public API. The user can also search for characters in the show using the search button.
-
Link to live site on GitHub: https://github.com/SusanGithaigaN/Phase-1-Independent-Project
-
The following image demonstrates the application functionality:
The main challenge was finding the right public API to implement onto the project. Most public APIs have a CORS(Cross-origin resource sharing) security feature that restricts HTTP requests that are initiated from scripts running in the browser, thus making it impossible to use some of the APIs.
To fetch data from our API in this lab, you are required to fetch data from the Rick & Morty public API. To filter characters, use the following API endpoint: [Filter characters(https://rickandmortyapi.com/api/character/?name)]
As I user:
- I can view all Rick& Morty Sitcom characters.
- I can search for characters on the show.
<!-- - I can be able to view how many episodes the characters appeared on. -->
-
Public API list: https://mixedanalytics.com/blog/list-actually-free-open-no-auth-needed-apis/
-
Fetching data from an API: https://rapidapi.com/guides/how-to-get-data-from-api-javascript
-
How to use search filters on an API: https://www.youtube.com/watch?v=qbdSyMdjydM
-
Javascript events:
https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event .
https://linuxhint.com/change-button-color-on-click-javascript/ .