This task is to implement a Python script to call the Portal's below API endpoint and translate the response into the current format.
API endpoint:
GET https://portal.ce.pdn.ac.lk/api/taxonomy/v1/students
Destination File:
https://github.com/cepdnaclk/www.ce.pdn.ac.lk/blob/main/_data/students.json
Additionally, I prefer to update the Destination File format to something like the following:
{
"undergraduate": {
"name": "Undergraduate Students",
"profiles_page": "https://people.ce.pdn.ac.lk",
"students": [
{
"name": "E22 Batch",
"code": "e22",
"profiles_page": "/students/e22/",
"start_date": "<optional, default is null>",
"end_date": "<optional, default is null>"
}
]
},
"postgraduate": {
"name": "Postgraduate Students",
"profiles_page": "https://people.ce.pdn.ac.lk/students/postgraduate/",
"students": []
}
}
This task is to implement a Python script to call the Portal's below API endpoint and translate the response into the current format.
API endpoint:
GET https://portal.ce.pdn.ac.lk/api/taxonomy/v1/students
Destination File:
https://github.com/cepdnaclk/www.ce.pdn.ac.lk/blob/main/_data/students.json
Additionally, I prefer to update the Destination File format to something like the following:
{ "undergraduate": { "name": "Undergraduate Students", "profiles_page": "https://people.ce.pdn.ac.lk", "students": [ { "name": "E22 Batch", "code": "e22", "profiles_page": "/students/e22/", "start_date": "<optional, default is null>", "end_date": "<optional, default is null>" } ] }, "postgraduate": { "name": "Postgraduate Students", "profiles_page": "https://people.ce.pdn.ac.lk/students/postgraduate/", "students": [] } }