This project demonstrates the usage of the JSONPlaceholder API by making HTTP requests and retrieving data from various endpoints. It is implemented in Python using the requests library.
- Clone the repository to your local machine:https://github.com/radman-s/REST_API
- Navigate to the project directory: cd JSONPlaceholderAPI
- Install the required dependencies: pip install requests
- Run the
main.py
script: python main.py - You will be prompted to choose an endpoint:
- Enter
1
to display users information. - Enter
2
to display comments information. - Enter
3
to display albums information. - Enter
4
to display photos information. - Enter
5
to display todos information.
- The corresponding data will be retrieved from the JSONPlaceholder API and displayed on the console.
- The JSONPlaceholder API (https://jsonplaceholder.typicode.com) for providing the sample data.