The objective of this assignment is to integrate an external API to fetch and display real-time
news headlines on a news website. This task will assess your ability to work with external
APIs, handle data responses, and seamlessly integrate the functionality into a sample news
website.
API Documentation:
- API Provider: News API
- API Documentation: [News API
Documentation](https://newsapi.org/docs/endpoints/top-headlines)
使用法:
1. Frontend Integration:
- Create a new section on the homepage of the news website to display the latest
headlines.
- Display at least 5 headlines along with the article source and publication date.
2. Backend Integration (Optional):
- If your application has a backend, create a route to fetch news headlines from the News
API.
- Cache the responses to reduce the number of API calls.
3. Error Handling:
- Implement error handling for cases where the API request fails.
- Display a user-friendly message if there are issues fetching the headlines.
必要な機能:
User Interface
機能の詳細:
1. Frontend Integration:
- Create a new section on the homepage of the news website to display the latest
headlines.
- Display at least 5 headlines along with the article source and publication date.
2. Backend Integration (Optional):
- If your application has a backend, create a route to fetch news headlines from the News
API.
- Cache the responses to reduce the number of API calls.
3. Error Handling:
- Implement error handling for cases where the API request fails.
- Display a user-friendly message if there are issues fetching the headlines.
All Comments