Write an HTML/Javascript page
This page will provide users with food alerts from the Food
Standards Agency.
As the minimum, the page should display the top 10 most recent
food alerts including the
title, date, business affected and a short risk-statement for
each food alert. Additionally, it
should also include a description of the content that is
displayed on this page.
For this, you are required to use the Food Alert API from the
Food Standards Agency:
• https://data.food.gov.uk/food-alerts/id : API Link
• https://data.food.gov.uk/food-alerts/ui/reference : API
Reference
In detail, the user will open the page and see a well-formatted,
dynamic overview of the 10
most recent alerts. Those alerts will have been retrieved,
following a call to the endpoint with
the URL: https://data.food.gov.uk/food-alerts/id?_sort=-created
(This includes the sortingby-
date query). It should then display the following
properties:
- A shortened version of the title of the alert.
- The date the alert was created.
- The name by which the business affected is commonly known.
- Text describing the problem in terms of the risk to consumers
for the first problem (if
multiple exist)
The exact JSON object properties for the required data can be
determined from the API
documentation:
https://data.food.gov.uk/food-alerts/ui/reference
Write an HTML/Javascript page This page will provide users with food alerts from the Food Standards Agency. As the minim
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am